SG-iCalendar
SG-iCalendar copied to clipboard
fix warning/errors with php8
Found some warnings/errors, fixed them.
- replaced {} with [] for acessing
- fixed create_function not existing in php8
Don't know if they break stuff below php8.
SG_iCal_Query::Sort seems to not work as expected. It didn't sort my entries after the column 'start'. Maybe I broke something, but I am using the almost same function for comparision and it works (having a different array).
Also I get the following errors/warnings (using php8), no fix in this pull request for the following, but maybe it can be added:
Deprecated: Return type of SG_iCal_Line::offsetExists($param) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/helpers/SG_iCal_Line.php on line 114
Deprecated: Return type of SG_iCal_Line::offsetGet($param) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/helpers/SG_iCal_Line.php on line 121
Deprecated: Return type of SG_iCal_Line::offsetSet($param, $val) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/helpers/SG_iCal_Line.php on line 132
Deprecated: Return type of SG_iCal_Line::offsetUnset($param) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/helpers/SG_iCal_Line.php on line 140
Deprecated: Return type of SG_iCal_Line::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/helpers/SG_iCal_Line.php on line 155
Deprecated: Return type of SG_iCal_Line::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/helpers/SG_iCal_Line.php on line 162
Deprecated: Return type of SG_iCal_VCalendar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/web/test/ics/SG-iCalendar/blocks/SG_iCal_VCalendar.php on line 51