Title: Version 2.4 breaks WP-CLI
Last modified: February 3, 2022

---

# Version 2.4 breaks WP-CLI

 *  Resolved [Templ](https://wordpress.org/support/users/templ/)
 * (@templ)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/)
 * Hi!
 * I’ve had WP-CLI on two sites break after upgrading to svg-support 2.4.
 * Here’s what happens:
 *     ```
       user_1387@slim:~/arbetsgladje.se$ wp option get home
       PHP Warning:  Creating default object from empty value in /home/user_1387/wordpress/wp-content/themes/arbetsgladje/includes/theme.php on line 5
       Warning: Creating default object from empty value in /home/user_1387/wordpress/wp-content/themes/arbetsgladje/includes/theme.php on line 5
       PHP Fatal error:  Uncaught Error: Call to a member function setAllowedTags() on null in /home/user_1387/wordpress/wp-content/plugins/svg-support/functions/attachment.php:246
       Stack trace:
       #0 /home/user_1387/wordpress/wp-includes/class-wp-hook.php(307): bodhi_svgs_apply_filters()
       #1 /home/user_1387/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
       #2 /home/user_1387/wordpress/wp-includes/plugin.php(474): WP_Hook->do_action()
       #3 /home/user_1387/wordpress/wp-settings.php(565): do_action()
       #4 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require('/home/user_1387...')
       #5 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
       #6 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
       #7 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()
       #8 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
       #9 phar in /home/user_1387/wordpress/wp-content/plugins/svg-support/functions/attachment.php on line 246
       Fatal error: Uncaught Error: Call to a member function setAllowedTags() on null in /home/user_1387/wordpress/wp-content/plugins/svg-support/functions/attachment.php:246
       Stack trace:
       #0 /home/user_1387/wordpress/wp-includes/class-wp-hook.php(307): bodhi_svgs_apply_filters()
       #1 /home/user_1387/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
       #2 /home/user_1387/wordpress/wp-includes/plugin.php(474): WP_Hook->do_action()
       #3 /home/user_1387/wordpress/wp-settings.php(565): do_action()
       #4 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require('/home/user_1387...')
       #5 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
       #6 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
       #7 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()
       #8 phar:///usr/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
       #9 phar in /home/user_1387/wordpress/wp-content/plugins/svg-support/functions/attachment.php on line 246
       Error: Det har uppstått ett kritiskt fel på webbplatsen.Läs mer om felsökning i WordPress. Det har uppstått ett kritiskt fel på webbplatsen.
       ```
   
 * It works upon downgrading to 2.3.21.

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

 *  Plugin Author [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * (@benbodhi)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15324215)
 * Hi there!
 * Wow! Damn, thanks for pointing this out! Will look into it and update.
 *  [entrepreneuraj](https://wordpress.org/support/users/entrepreneuraj/)
 * (@entrepreneuraj)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15324869)
 * Confirmed my site is now having the same issues after auto updates with WP-Cron
   ran via WP-CLI.
    Now every minute WP-Cron is emailing me an error log having 
   to delete plugin until fixed. logs:
 *     ```
       PHP Fatal error:  Uncaught Error: Call to a member function setAllowedTags() on null in /home/eajglobal/public_html/wp-content/plugins/svg-support/functions/attachment.php:246
       Stack trace:
       #0 /home/eajglobal/public_html/wp-includes/class-wp-hook.php(307): bodhi_svgs_apply_filters()
       #1 /home/eajglobal/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
       #2 /home/eajglobal/public_html/wp-includes/plugin.php(474): WP_Hook->do_action()
       #3 /home/eajglobal/public_html/wp-settings.php(565): do_action()
       #4 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('/home/eajglobal...')
       #5 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
       #6 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
       #7 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
       #8 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
       #9 phar:///usr/bi in /home/eajglobal/public_html/wp-content/plugins/svg-support/functions/attachment.php on line 246
       Fatal error: Uncaught Error: Call to a member function setAllowedTags() on null in /home/eajglobal/public_html/wp-content/plugins/svg-support/functions/attachment.php:246
       Stack trace:
       #0 /home/eajglobal/public_html/wp-includes/class-wp-hook.php(307): bodhi_svgs_apply_filters()
       #1 /home/eajglobal/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
       #2 /home/eajglobal/public_html/wp-includes/plugin.php(474): WP_Hook->do_action()
       #3 /home/eajglobal/public_html/wp-settings.php(565): do_action()
       #4 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require('/home/eajglobal...')
       #5 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
       #6 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
       #7 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process()
       #8 phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
       #9 phar:///usr/bi in /home/eajglobal/public_html/wp-content/plugins/svg-support/functions/attachment.php on line 246
       Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
       ```
   
 *  [mbfdias](https://wordpress.org/support/users/mbfdias/)
 * (@mbfdias)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15325451)
 * confirmed, had to downgrade back to 2.3.21 to stop WP-Cron from going mad 😉
 *  [apsolut](https://wordpress.org/support/users/apsolut/)
 * (@apsolut)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15325817)
 * WP-CLI (cant regenerate images etc..):
    Can confirm line `plugins/svg-support/
   functions/attachment.php:246`
 *  Plugin Author [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * (@benbodhi)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15326063)
 * Sorry friends, of course it was 1am for me when this came up.
 * I’ll push an update asap.
 * Thank you for your patience and for reporting!
 *  Plugin Author [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * (@benbodhi)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15326217)
 * This should be fixed in 2.4.1.
 * I tested WP-CLI using 2.4 and reproduced the same error, then updated and no 
   error 🙂
 * Please let me know how you go and if you spot anything else.
 * And thank you all for the report, support and patience!
 *  [Mario Souza](https://wordpress.org/support/users/itsmariosouza/)
 * (@itsmariosouza)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15329685)
 * All fixed for me with 2.4.2, thanks for the quick update!
 *  Plugin Author [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * (@benbodhi)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15330652)
 * Great news!
 * Thanks for your support and patience friends!
 * Please consider leaving a review 😉

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

The topic ‘Version 2.4 breaks WP-CLI’ is closed to new replies.

 * ![](https://ps.w.org/svg-support/assets/icon.svg?rev=1417738)
 * [SVG Support](https://wordpress.org/plugins/svg-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/svg-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/svg-support/)
 * [Active Topics](https://wordpress.org/support/plugin/svg-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/svg-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/svg-support/reviews/)

 * 8 replies
 * 6 participants
 * Last reply from: [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/version-2-4-breaks-wp-cli/#post-15330652)
 * Status: resolved