fix PHP 8.0 TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given

This commit is contained in:
Ralf Becker 2021-11-15 14:53:35 +01:00
parent eca5200268
commit f7247a6ea9

View File

@ -888,9 +888,9 @@ class calendar_merge extends Api\Storage\Merge
*/ */
protected function normalize_event_id($id) 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 = $id;
$id = array(); $id = array();