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

PHP 8.2: Warnings about deprecated usage of strtolower #3944

Open
MattWilliamsDev opened this issue Jul 2, 2024 · 2 comments
Open

PHP 8.2: Warnings about deprecated usage of strtolower #3944

MattWilliamsDev opened this issue Jul 2, 2024 · 2 comments
Labels
bug Something isn't working small (< 4 hours)
Milestone

Comments

@MattWilliamsDev
Copy link

While running a network-wide sync, we saw numerous instances of Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-content/plugins/elasticpress/includes/classes/IndexHelper.php on line 297.

Some of the items we were syncing did not have label['plurals'] defined, leading to null being passed to esc_html( strtolower( $indexable->labels['plural'] ) ), spurring the warning. While this can certainly be avoided in the implementation, I also believe simple steps could be taken to safeguard against this warning.

@burhandodhy burhandodhy added this to the 5.2.0 milestone Jul 4, 2024
@burhandodhy burhandodhy added the bug Something isn't working label Jul 4, 2024
@burhandodhy
Copy link
Contributor

Hi @MattWilliamsDev,

Thank you for reporting the bug. We will try to have it fixed in the next version. Would you like to open a Pull Request with the fix? Thanks!

@MattWilliamsDev
Copy link
Author

Hi @MattWilliamsDev,

Thank you for reporting the bug. We will try to have it fixed in the next version. Would you like to open a Pull Request with the fix? Thanks!

I will try and put something in tomorrow if possible. Holiday today.

@felipeelia felipeelia added the small (< 4 hours) label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working small (< 4 hours)
Projects
None yet
Development

No branches or pull requests

3 participants