Support » Plugin: reSmush.it Image Optimizer » PHP Warning on the plugin page

  • Resolved alexkichkailo

    (@alexkichkailo)


    I see the following PHP warning on the plugin page (Media-> reSmush.it

    sizeof(): Parameter must be an array or an object that implements Countable
    wp-content\plugins\resmushit-image-optimizer\classes\resmushit.class.php on line 356

    there is a missing check for is_array before using the sizeof function. In my case filesnotfound is not an array.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author reSmush.it

    (@resmushit)

    Hi Alex,

    Thanks a lot for your feedback, it’s due to a PHP 7.2 new checks on sizeof() function. It has been corrected and will be released today.

    Cheers,
    Charles

    seuser

    (@seuser)

    Hi Charles,

    There is another php 7.2 notice issue as well:
    Notice: Undefined variable: files_not_found in /var/www/html/wp-content/plugins/resmushit-image-optimizer/classes/resmushit.class.php on line 343

    This can be fixed by defining the array initially at the top of reSmushit::getNonOptimizedPictures() like $files_not_found = array();.

    Thanks,
    Scott

    • This reply was modified 1 year ago by seuser.
    Plugin Author reSmush.it

    (@resmushit)

    Hi guys,

    The release has been posted, you can now update 🙂
    Thanks for your feedbacks !

    Cheers,
    Charles

    Do not hesitate to rate our plugin if you liked it !

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Warning on the plugin page’ is closed to new replies.