• Resolved Gioxx

    (@gioxx)


    Hello. My PHP error log is almost full of this warning and I would like to understand if it’s possible to fix the problem and push out a new version of the plugin:

    PHP Warning:  Undefined array key "file" in /public_html/wp-content/plugins/resmushit-image-optimizer/resmushit.php on line 114
    PHP Warning:  Undefined array key "sizes" in /public_html/wp-content/plugins/resmushit-image-optimizer/resmushit.php on line 123
    PHP Warning:  foreach() argument must be of type array|object, null given in /public_html/wp-content/plugins/resmushit-image-optimizer/resmushit.php on line 123

    Any help appreciated.
    Thanks for your work.

Viewing 10 replies - 1 through 10 (of 10 total)
  • I have been using reSmush.it for a long time, but since last spring, it is hardly ever works. I gave up on it. This ShortPixel plugin will onvert to JPG and compress for free. No restrictions on it. It says it’s a resize plugin, but it actually does conpression too. ??

    https://www.ads-software.com/plugins/resize-image-after-upload/

    Thread Starter Gioxx

    (@gioxx)

    Thanks for the suggestion @macksix ??
    I will test the plugin to understand if suite my needs.

    @gioxx, I revisited the plugin and tried it on PHP 8.1 and PHP 7.4 and did not get any of those warning messages. What version of PHP are you using?

    I am happy to say that I regenerated 100 thumbnails with no failures, so it looks like this plugin may be viable again. It took about 25 min. to do 100 images. The speed looks to be what it has always been.

    Also, try contacting them here about the warnings: https://resmush.it/bugreport

    Thread Starter Gioxx

    (@gioxx)

    What version of PHP are you using?

    8.0, but I have now upgraded to 8.1 to do a new test.
    I have no problems with image resizing, but the plugin produces many warnings identical to those I reported in my first post of the discussion.

    Hi,

    Same type of problem, but different warning:

    Warning: Undefined array key “dirname” in plugins/resmushit-image-optimizer/resmushit.php on line 112

    This error is triggered during cron execution.

    With the EOL of php 7.4 we are moving to PHP 8 / 8.1 and are facing that kind of errors in lots of plugins. This is due to the fact that PHP 8 has reviewed the severity of many errors. Some old notices are now warnings.

    Hope you could fix this soonly so we can stop the logs storm.

    Plugin Contributor reSmush.it

    (@resmushit)

    Hi guys,

    We’re currently working on producing a fully compatible 8.1 version of the plugin, that also needs to be retro-compatible with previous and outdated PHP versions.

    We plan to release this version by next week.

    Regards,
    Charles

    Thread Starter Gioxx

    (@gioxx)

    This is a great news!
    Thanks for sharing it, we just have to wait for the release of the plugin update ??

    Plugin Contributor reSmush.it

    (@resmushit)

    Hi guys,

    New update available!
    – PHP 8.1 compatible plugin
    – WP 6.1 compatible
    – fix with the PHP Warning reported above

    Have a great day,
    Charles

    Thread Starter Gioxx

    (@gioxx)

    Thanks a lot! Updated ??

    Plugin Contributor reSmush.it

    (@resmushit)

    Great, I close the ticket!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Undefined array key “file” and “sizes”’ is closed to new replies.