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

[BUGFIX] Avoid warning when accessing array offset on int #23

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

Conversation

brotkrueml
Copy link

On PHP 8 I got this error:

PHP Warning: Trying to access array offset on value of type int in /var/www/html/public/typo3conf/ext/page_speed_insights/Classes/FormEngine/Elements/History.php line 60

The patch fixes this. I haven't got an array in my tests, but an int with 0 and a string with "0", so used the is_numeric() check.

On PHP 8 I got this error:

PHP Warning: Trying to access array offset on value of type int in /var/www/html/public/typo3conf/ext/page_speed_insights/Classes/FormEngine/Elements/History.php line 60

The patch fixes this. I haven't got an array in my tests, but an int with `0` and a string with `"0"`, so used the `is_numeric()` check.
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