I have an issue after updating the last WP version. Now I have this errors on my dashboard:
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
When I deactivate post-terms-order plugin, all theses errors disappear.
I have an issue after updating the last WP version. Now I have this errors on my dashboard:
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
When I deactivate post-terms-order plugin, all theses errors disappear.
Share Improve this question edited Nov 15, 2019 at 12:29 Hector 6821 gold badge7 silver badges18 bronze badges asked Nov 15, 2019 at 10:39 Khalil MouelhiKhalil Mouelhi 111 bronze badge1 Answer
Reset to default 1Welcome!
This PHP warning is related to the new update of WordPress (5.3) which had a change in Walker class.
Previously the walker
method had 2 arguments. In the new update, it has more arguments.
In order to fix the issue, You need to change the code from Post_Terms_Order_Walker::walk($elements, $max_depth)
to Post_Terms_Order_Walker::walk($elements, $max_depth, ...$args)
Note: Possibly the rests of errors are caused by the first one. As it is going to output the error, it sends headers.