Title: PHP &gt;= 8.0 fatal errors
Last modified: June 19, 2023

---

# PHP >= 8.0 fatal errors

 *  Resolved [robwent](https://wordpress.org/support/users/robwent/)
 * (@robwent)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/)
 * Hi,
 * I have your plugin running on some sites with PHP 8.2 with no issues.
 * On another, I’m getting fatal errors that the class EWWWIO_GD_Editor isn’t a 
   valid callback.
 * It happens when any plugin or theme calls the wp_enqueue_media() function in 
   the admin. If I comment that out then the admin loads but those plugins and themes
   are broken (Mostly commercial, revslider, newspaper theme and a custom plugin).
 * If I disable ewww then everything works.
 * This happens with any PHP version from 8.0 up.
 * General stack trace:
 *     ```wp-block-code
       [19-Jun-2023 21:25:23 UTC] PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, class "EWWWIO_GD_Editor" not found in path\wp-includes\media.php:3934Stack trace:
   
       0 path\wp-includes\media.php(3905): _wp_image_editor_choose(Array)
   
       1 path\wp-includes\media.php(4019): wp_image_editor_supports(Array)
   
       2 path\wp-includes\media.php(4748): wp_plupload_default_settings()
   
       3 path\wp-content\plugins\wp-templater\modules\scripts.php(10): wp_enqueue_media()
   
       4 path\wp-includes\class-wp-hook.php(308): wt_add_script_fn('')
   
       5 path\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
   
       6 path\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
   
       7 path\wp-includes\script-loader.php(2026): do_action('wp_print_script…')
   
       8 path\wp-includes\class-wp-hook.php(308): print_head_scripts('')
   
       9 path\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
   
       10 path\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
   
       11 path\wp-admin\admin-header.php(146): do_action('admin_print_scr…')
   
       12 path\wp-admin\plugins.php(605): require_once('D:\laragon\www\…')
   
       13 {main}
   
       thrown in path\wp-includes\media.php on line 3934
       ```
   
 * Possibly has something to do with removing the wp_image_editors filter?
 * Is that enough info to test?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16834884)
 * Hmm, I was thinking also that perhaps if another plugin removed our wp_image_editors
   filter/function, it might cause issues. But, both the class declarations and 
   the addition of the EWWWIO_GD_Editor to the list of available image editors happen
   in the filter function: ewww_image_optimizer_load_editor().
 * The only way I can see for the EWWWIO_GD_Editor class to be “registered” in the
   list of editors and yet not exist, is if the Bbpp_Animated_Gif class exists. 
   This is from a very old (and unmaintained) Animated GIF Resize plugin. Don’t 
   suppose you have that plugin on the site?
 * I do see that our “deprecation” of support for AGR wasn’t done very well, so 
   I’m going to see if we can improve that in the next release and make sure to 
   avoid this sort of error, whatever the cause might be.
 *  Thread Starter [robwent](https://wordpress.org/support/users/robwent/)
 * (@robwent)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16835081)
 * Yes!
 * That’s one I had to fix: [https://github.com/robwent/animated-gif-resize](https://github.com/robwent/animated-gif-resize)
 * Unfortunatly I might need to keep it as core still doesn’t seem to support it.
 * I’ll have a look through the code and see what I can do. Odd that the behaviour
   changes with PHP versions.
 * Thanks for looking into it!
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16837564)
 * FYI, part of the reason we stopped supporting AGR is that EWWW IO has built-in
   support for resizing animated GIFs–using gifsicle, so long as your server supports
   running that locally and/or you’re using the Compress API with an active key.
 * If you’re using free/local mode and you’re not sure, you can check the System
   Info on the Support tab to see if the plugin is able to detect gifsicle. You 
   can also post the System Info via pastebin and we can double-check it for you.
 *  Thread Starter [robwent](https://wordpress.org/support/users/robwent/)
 * (@robwent)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16837817)
 * Looks like it’s there:
 *     ```wp-block-code
       enabled: gifsicleenabled: jpegtranenabled: optipngwp-content/ewww permissions: 0755EWWW\Local::install_paths()CPU architecture: x86_64generated paths:path/wp-content/plugins/ewww-image-optimizer/binaries/jpegtran-linuxpath/wp-content/plugins/ewww-image-optimizer/binaries/optipng-linuxpath/wp-content/plugins/ewww-image-optimizer/binaries/gifsicle-linuxpath/wp-content/plugins/ewww-image-optimizer/binaries/pngquant-linuxpath/wp-content/plugins/ewww-image-optimizer/binaries/cwebp-linuxpath/wp-content/ewww/jpegtranpath/wp-content/ewww/optipngpath/wp-content/ewww/gifsiclepath/wp-content/ewww/pngquantpath/wp-content/ewww/cwebpLinux/UNIX style OS, checking permissionsEWWW\Local::check_permissions()permissions for path/wp-content/ewww/jpegtran: 0755permissions okEWWW\Local::check_permissions()permissions for path/wp-content/ewww/gifsicle: 0755permissions okEWWW\Local::check_permissions()permissions for path/wp-content/ewww/optipng: 0755permissions okewww_image_optimizer_load_editor()loading image editors: EWWWIO_Imagick_EditorEWWWIO_GD_EditorWP_Image_Editor_ImagickBbpp_Animated_GifWP_Image_Editor_GDewww_image_optimizer_bulk_script()ewww_image_optimizer_tool_script()ewww_image_optimizer_webp_script()ewww_image_optimizer_settings_script()EWWW\Base::content_url()site/upload url: https://www.goodnewsnetwork.orgsite/upload domain: www.goodnewsnetwork.orgupload_url: https://www.goodnewsnetwork.org/wp-content/uploads/ewww_image_optimizer_easy_site_registered()EWWW\Plugin::notice_utils()EWWW\Local::exec_check()EWWW\Local::check_all_tools()EWWW\Local::check_tool()EWWW\Local::find_nix_binary()checking bundled toolfound path/wp-content/ewww/gifsicle, testing…EWWW\Local::check_integrity()path/wp-content/ewww/gifsicle: 205abe804d1060375f713d990c45b0285cbc4b56226da1612e9f1d2d2e2c5369checksum verified, binary is intactEWWW\Base::mimetype()testing mimetype: path/wp-content/ewww/gifsicle7f454c46ewwwio type: application/x-executableEWWW\Local::test_binary()testing case: gifsicle at path/wp-content/ewww/gifsiclepath/wp-content/ewww/gifsicle: LCDF Gifsicle 1.93optimizer foundusing: path/wp-content/ewww/gifsicleEWWW\Local::check_tool()EWWW\Local::find_nix_binary()
       ```
   
 * So I can just disable the other plugin?
 *  Thread Starter [robwent](https://wordpress.org/support/users/robwent/)
 * (@robwent)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16838126)
 * I’ve just tested with a large sized animated gif with AGR off.
 * There’s no animated resized versions, but there’s also no static ones either.
 * With EWWW off and AGR enabled, static thumbs are created. So it’s not working
   anyway.
 * Case closed. Thanks for taking a look!
 * Update: Testing on the live site, animated thumbs are created. exec was disabled
   for the dev domain.
    -  This reply was modified 2 years, 11 months ago by [robwent](https://wordpress.org/support/users/robwent/).
    -  This reply was modified 2 years, 11 months ago by [robwent](https://wordpress.org/support/users/robwent/).
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16840384)
 * Yup, if exec() is disabled, then the site would be using free+API mode which 
   is JPG-only, so that makes sense. Glad you got it working!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP >= 8.0 fatal errors’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 6 replies
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/php-8-0-fatal-errors/#post-16840384)
 * Status: resolved