fix PHP 8.0 TypeError: Cannot access offset of type string on string

This commit is contained in:
Ralf Becker 2021-11-15 08:00:14 +01:00
parent f4a8b56680
commit b07d08a235

View File

@ -777,7 +777,7 @@ class calendar_merge extends Api\Storage\Merge
else if((strpos($content, '$$pagerepeat') !== false || strpos($content, '{{pagerepeat') !== false)
&& ((strpos($content, '$$range') === false && strpos($content, '{{range') === false)))
{
if(is_array($ids) && $ids[0] && !$ids[0]['id'])
if (is_array($ids) && !empty($ids[0]) && !(is_array($ids[0]) || isset($ids[0]['id'])))
{
foreach($ids as $range)
{