From 601cd428e504dbb56a8c30ff50cf3474aad3b056 Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 1 Dec 2023 14:20:25 +0200 Subject: [PATCH] WIP Timesheet REST API: fix PHP Fatal error in Addressbook&Calendar REST API Declaration of parseCategories must be compatible --- api/src/CalDAV/JsBase.php | 1 + api/src/CalDAV/JsCalendar.php | 3 ++- api/src/Contacts/JsContact.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/CalDAV/JsBase.php b/api/src/CalDAV/JsBase.php index 9a3d7d1cb0..76b406735f 100644 --- a/api/src/CalDAV/JsBase.php +++ b/api/src/CalDAV/JsBase.php @@ -265,6 +265,7 @@ class JsBase * Parse categories object * * @param array $categories category-name => true pairs + * @param bool $multiple * @return ?string comma-separated cat_id's * @todo make that generic, so JsContact & JSCalendar have not to overwrite it */ diff --git a/api/src/CalDAV/JsCalendar.php b/api/src/CalDAV/JsCalendar.php index 06d2d31a48..74cb2115e1 100644 --- a/api/src/CalDAV/JsCalendar.php +++ b/api/src/CalDAV/JsCalendar.php @@ -205,9 +205,10 @@ class JsCalendar extends JsBase * Parse categories object * * @param array $categories category-name => true pairs + * @param bool $multiple * @return ?string comma-separated cat_id's */ - protected static function parseCategories(array $categories) + protected static function parseCategories(array $categories, bool $multiple=true) { static $bo=null; $cat_ids = []; diff --git a/api/src/Contacts/JsContact.php b/api/src/Contacts/JsContact.php index 5b2329fab4..c5b8fbd304 100644 --- a/api/src/Contacts/JsContact.php +++ b/api/src/Contacts/JsContact.php @@ -351,9 +351,10 @@ class JsContact extends Api\CalDAV\JsBase * Parse categories object * * @param array $categories category-name => true pairs + * @param bool $multiple * @return ?string comma-separated cat_id's */ - protected static function parseCategories(array $categories) + protected static function parseCategories(array $categories, bool $multiple=true) { static $bo=null; $cat_ids = [];