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

using renames method calendar_ical::iCalSearch() instead of ::search() which required unchanged signature of calendar_bo::search()
This commit is contained in:
Ralf Becker 2021-11-22 11:07:25 +01:00
parent 8f73669d6a
commit 461c0171da

View File

@ -2077,7 +2077,7 @@ class mail_compose
{
//error_log(__METHOD__."about to call calendar_ical");
$calendar_ical = new calendar_ical();
$eventid = $calendar_ical->search($attachment['attachment'],-1);
$eventid = $calendar_ical->iCalSearch($attachment['attachment'],-1);
//error_log(__METHOD__.array2string($eventid));
if (!$eventid) $eventid = -1;
$event = $calendar_ical->importVCal($attachment['attachment'],(is_array($eventid)?$eventid[0]:$eventid),null,true);