From f7247a6ea9ace9ed4f62d8f4d6b3787fcf1f6b60 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Nov 2021 14:53:35 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given --- calendar/inc/class.calendar_merge.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_merge.inc.php b/calendar/inc/class.calendar_merge.inc.php index 60af4f99bb..51960aea56 100644 --- a/calendar/inc/class.calendar_merge.inc.php +++ b/calendar/inc/class.calendar_merge.inc.php @@ -888,9 +888,9 @@ class calendar_merge extends Api\Storage\Merge */ protected function normalize_event_id($id) { - if(is_string($id) || is_array($id) && $id['id'] && !$id['start']) + if(is_string($id) || is_array($id) && !empty($id['id']) && empty($id['start'])) { - if(strpos($id, ':')) + if (is_string($id) && strpos($id, ':')) { $_id = $id; $id = array();