更新后的条款-订购PHP错误

时间:2019-11-15 作者:Khalil Mouelhi

我有一个问题后,更新了最新的WP版本。现在,我的仪表板上出现以下错误:

Post_Terms_Order_Walker::walk($elements, $max_depth) should be compatible with Walker::walk($elements, $max_depth, ...$args) in /home/***/wp-content/plugins/post-terms-order/include/pto_walkers.php on line 135

Warning: Cannot modify header information - headers already sent by (output started at /home/***/wp-content/plugins/post-terms-order/include/pto_interface-class.php:25) in /home/***/wp-includes/functions.php on line 5946

Warning: Cannot modify header information - headers already sent by (output started at /home/***/wp-content/plugins/post-terms-order/include/pto_interface-class.php:25) in /home/***/wp-admin/includes/misc.php on line 1252

Warning: Cannot modify header information - headers already sent by (output started at /home/***/wp-content/plugins/post-terms-order/include/pto_interface-class.php:25) in /home/***/wp-admin/admin-header.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at /home/***/wp-content/plugins/post-terms-order/include/pto_interface-class.php:25) in /home/***/wp-includes/option.php on line 958

Warning: Cannot modify header information - headers already sent by (output started at /home/***/wp-content/plugins/post-terms-order/include/pto_interface-class.php:25) in /home/***/wp-includes/option.php on line 959
当我停用post terms order插件时,所有这些错误都消失了。

1 个回复
SO网友:Hector

欢迎

此PHP警告与WordPress(5.3)的新更新有关,该更新对Walker类进行了更改。

之前walker 方法有2个参数。在新的更新中,它有更多的参数。

为了解决此问题,您需要将代码从Post_Terms_Order_Walker::walk($elements, $max_depth)Post_Terms_Order_Walker::walk($elements, $max_depth, ...$args)

注:其余错误可能是由第一个错误引起的。当它要输出错误时,它会发送头。

相关推荐

无法使用deactive_plugins()自停用插件

我有这些插件文件:我的插件/我的插件。php我的插件/我的插件类。php中my-plugin.php 我有以下几行:register_activation_hook( __FILE__, array( $my_plugin_object, \'on_activate_my_plugin\' ) ); 在中my-plugin-class.php 我有以下方法:public function on_activate_my_plugin() { if ( // Some validat