-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fatal error when having image size with integer name #888
Comments
imagify.2.2.2.zip |
Another relevant ticket with proposed solution https://secure.helpscout.net/conversation/2680413623/507765?folderId=676697
|
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
In a customer's site we face the following error:
and this happens exactly here:
imagify-plugin/classes/Optimization/Process/AbstractProcess.php
Line 1641 in a5b7820
In the PR (#877) we fixed similar issue when the image size name is not integer, but we once the image is optimized we save the sizes in the attachment metas to be grabbed later on the mentioned line (as far as I understand) but in php if the array has numeric keys even if u added them as strings, this will be cast to be integer then it throws the previously mentioned fatal error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Images should load without a problem.
I fixed this by casting the $key variable here:
imagify-plugin/classes/Optimization/Process/AbstractProcess.php
Line 1641 in a5b7820
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming
The text was updated successfully, but these errors were encountered: