• Resolved juanlopez4691

    (@juanlopez4691)


    The plugin is rising a PHP warning with PHP 8.2: “Deprecated: Creation of dynamic property DateInterval::$w is deprecated in /var/www/html/wp-content/plugins/resmushit-image-optimizer/resmushit.inc.php on line 118”

    Plugin version: 0.4.13

    My fix:

    diff –git a/wp-content/plugins/resmushit-image-optimizer/resmushit.inc.php b/wp-content/plugins/resmushit-image-optimizer/resmushit.inc.php
    index b87bad74..3ce2a2e6 100644
    — a/wp-content/plugins/resmushit-image-optimizer/resmushit.inc.php
    +++ b/wp-content/plugins/resmushit-image-optimizer/resmushit.inc.php
    @@ -115,7 +115,7 @@ function time_elapsed_string($duration, $full = false) {
    $ago = new DateTime($datetime);
    $diff = $now->diff($ago);

    – $diff->w = floor($diff->d / 7);
    + @$diff->w = floor($diff->d / 7);
    $diff->d -= $diff->w * 7;
    $string = array(



    • This topic was modified 11 months, 4 weeks ago by juanlopez4691.
    • This topic was modified 11 months, 4 weeks ago by juanlopez4691.
Viewing 1 replies (of 1 total)
  • Plugin Support Adrian

    (@adrianrus)

    Hi @juanlopez4691,

    Sorry for the slow reply, looks like this has been missed by the old dev and we recently took over this project and added it to the ShortPixel family! ??

    I tried to reproduce this PHP warning on a dev website with PHP 8.2 but unfortunately I haven’t been able to.

    Could you please provide us more information about this and maybe the steps taken to encounter the warning using this page https://resmush.it/contact/ ?

    Looking forward to your message so we can investigate this further!

    All the best!

Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8.2 Deprecation warnings’ is closed to new replies.