Closed rteitge closed 1 year ago
In substr
PHP < 8 returns false when length
is greater than string length, since PHP 8 it returns ""
.
https://www.php.net/manual/en/function.substr.php
$rest = substr("abcdef", 4, -4); // returns ""; prior to PHP 8.0.0, false was returned
Hey @rteitge
should a simple string cast fix this problem alá $recurrence = (string)substr($calByday, 0, -2);
?
Regards,
Tim
Hi @lochmueller,
thank you for your hint, the cast seems to solve the problem. The script runs now. 👍
Best regards, Roman
When migrating from cal records to calendarize the wizard breaks at https://github.com/lochmueller/calendarize/blob/master/Classes/Updates/CalMigrationUpdate.php#L976
Here is the output of the related variables:
The last one causes the exception:
array_key_exists(): The first argument should be either a string or an integer
T3 v10.4-latest PHP 7.4-latest calendarize 12.4-latest