• Reüel

    (@pronamic_reuel)


    We received a lot of emails last night with these warnings from the cron (wp cron event run --due-now --quiet):

    Warning: Undefined array key "filesize" in /wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer.php on line 191
    Warning: Trying to access array offset on value of type bool in /wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer.php on line 191

    Seems something is going wrong or not handled correctly in your plugin. Please resolve soon, so the stream of cron notifications about this will end. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support daniellaivanova

    (@daniellaivanova)

    Hello @pronamic_reuel,

    This error might be caused by various factors, such as outdated PHP version or an outdated plugin. I recommend you to make sure that you are using the latest version of the Speed optimizer plugin and try changing the PHP version to a more recent one.

    In case the issue persists and if you are a SiteGround client, please, make sure to open a new ticket regarding the problem from your Client Area so we can review the matter in detail.

    Best Regards,
    Daniela Ivanova

    Thread Starter Reüel

    (@pronamic_reuel)

    We’re using the latest version of the Speed Optimizer plugin (version 7.7.0) and the “Managed PHP” setting (PHP 8.2.25). We haven’t changed PHP versions recently, so that can’t be the cause of these warnings.

    In case the issue persists and if you are a SiteGround client, please, make sure to open a new ticket regarding the problem from your Client Area so we can review the matter in detail.

    I already reached out to you through this ticket, so other users who might experience the same warnings can follow along. Can you please confirm you’re not seeing this warning with other sites and in your tests?

    Thread Starter Reüel

    (@pronamic_reuel)

    Seems the filesize in media metadata was added in WordPress 5.3, so the warnings occur for older media only.

    Thread Starter Reüel

    (@pronamic_reuel)

    Apparently, a colleague of mine had recently enabled the image optimisation feature for this site, which triggered processing of existing media — including media which had been uploaded < WordPress 5.3, which did not have the filesize stored in their metadata. Now that all images have been processed by your plugin, the warnings generated during cron execution seem to have stopped.

    So this issue is “resolved” for our site, but your developers might still want to look into this to resolve any possible warnings from occurring at all.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.