Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warning/errors with php8 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonathanmmm
Copy link

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.

@jonathanmmm jonathanmmm changed the title fix warning/errors under php8 fix warning/errors with php8 Dec 2, 2021
@jonathanmmm
Copy link
Author

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).

@jonathanmmm
Copy link
Author

jonathanmmm commented Dec 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant