Warning and Fatal error with version 2.0.44.1 and PHP 8.1

Hi,

Thanks for your useful plugin.

In version 2.44.1, calling from wp-cli I’m experiencing these warning:

key_exists() expects parameter 2 to be array, bool given in [...]/wp-content/plugins/easy-table-of-contents/includes/inc.functions.php on line 200

System cron tasks launching also causes errors:

PHP Fatal error: Uncaught TypeError: key_exists(): Argument #2 ($array) must be of type array, bool given in […]/wp-content/plugins/easy-table-of-contents/includes/inc.functions.php:200
Stack trace:

0 […]/wp-content/plugins/easy-table-of-contents/includes/inc.functions.php(200): key_exists()

1 […]/wp-content/plugins/easy-table-of-contents/easy-table-of-contents.php(157): ez_toc_get_browser_name()

2 […]/wp-content/plugins/easy-table-of-contents/easy-table-of-contents.php(94): ezTOC::hooks()

3 […]/wp-content/plugins/easy-table-of-contents/easy-table-of-contents.php(1368): ezTOC::instance()

4 […]/wp-includes/class-wp-hook.php(308): ezTOC()

5 […]/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()

6 […]/wp-includes/plugin.php(517): WP_Hook->do_action()

7 […]/wp-settings.php(480): do_action()

8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1336): require('…')

9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1254): WP_CLI\Runner->load_wordpress()

10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()

11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()

12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()

13 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('…')

14 /usr/local/bin/wp(4): include('…')

15 {main}

thrown in […]/wp-content/plugins/easy-table-of-contents/includes/inc.functions.php on line 200

Thanks for your attention and have a nice day.

  • This topic was modified 2 hours, 13 minutes ago by ABCdatos.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer