rosell-dk / webp-express

Wordpress plugin for serving autogenerated WebP images instead of jpeg/png to browsers that supports WebP
GNU General Public License v3.0
229 stars 64 forks source link

PHP 8.2: remove deprecation message #594

Closed robmeijerink closed 1 year ago

robmeijerink commented 1 year ago

In PHP 8.2 activating this plugin will give a white screen of death. This PR fixes the bug and restores the plugin's functionality.

jaxtheking commented 1 year ago

That's all that seems to be required for fixing the backend (while WP_DEBUG is true). However, there are more deprecation notices (Dynamic Properties are deprecated) in the frontend, which prevents images from being served. The following fixes them:

  1. In lib\classes\ImageRoots.php

    class ImageRoots
    {
    private $imageRootsDef;
    private $imageRoots;
    
    ...
    }
  2. In lib\classes\ImageRoot.php

    class ImageRoot
    {
    private $imageRootDef;
    public $id;
    
    ...
    }

Since you've already created a PR, could you also add these in the hope that the author picks it up. Thanks, Luca

rosell-dk commented 1 year ago

Released as 0.25.7