Wp-config.php文件中的错误:PHP致命错误:未捕获错误:未知命名参数(PHP 8.0)

时间:2021-03-06 作者:Abe

我得到以下错误:

[06-Mar-2021 03:07:05 UTC] PHP Fatal error:  Uncaught Error: Unknown named parameter $tasks_meta_id in /var/www/example.com/html/wordpress/wp-includes/class-wp-hook.php:287
Stack trace:
#0 /var/www/example.com/html/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
#1 /var/www/example.com/html/wordpress/wp-includes/plugin.php(551): WP_Hook->do_action()
#2 /var/www/example.com/html/wordpress/wp-content/plugins/wpforms-lite/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php(22): do_action_ref_array()
#3 /var/www/example.com/html/wordpress/wp-content/plugins/wpforms-lite/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php(65): ActionScheduler_Action->execute()
#4 /var/www/example.com/html/wordpress/wp-content/plugins/wpforms-lite/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php(162): ActionScheduler_Abstract_QueueRunner->process_action()
#5 /var/www/example.com/html/wordpress/wp-content/plugins/wpforms-lite/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch()
#6 /var/www/example.com/html/wordpress/wp-includes/class-wp-hook.php(287): ActionScheduler_QueueRunner->run()
#7 /var/www/example.com/html/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
#8 /var/www/example.com/html/wordpress/wp-includes/plugin.php(551): WP_Hook->do_action()
#9 /var/www/example.com/html/wordpress/wp-cron.php(138): do_action_ref_array()
#10 {main}
  thrown in /var/www/example.com/html/wordpress/wp-includes/class-wp-hook.php on line 287
有人能就此提出建议吗?我正在使用wpforms插件,即使禁用了所有插件,错误日志中仍然存在此错误。仅供参考,I have implemented this tutorial 不使用STMP插件发送电子邮件。我收到了电子邮件,一切看起来都很好,只是当我点击菜单链接在页面之间导航时,主题会严重抖动,我不知道原因是什么。当我查看错误日志以了解为什么会出现上述错误时,我使用了PHP 8.0,并且只安装了两个插件。非常感谢您的帮助。

1 个回复
SO网友:Abe

原因是该插件与PHP8不兼容。我已经联系了开发商,他们的建议是:

目前,我们还没有完全准备好PHP 8兼容性,但它很快就会出现。看起来您遇到的具体问题与PHP 8有关,因此很遗憾,您需要将服务器设置为运行PHP 7。X个

更新:例如,如果您想将PHP版本从8降级到7.4,可以使用this article.