Вот такое выползло в админке:
Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/u0835731/data/www/.../wp-admin/includes/plugin.php on line 1392
Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0835731/data/www/.../wp-admin/includes/plugin.php:1392) in /var/www/u0835731/data/www/.../wp-includes/functions.php on line 5946
Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0835731/data/www/.../wp-admin/includes/plugin.php:1392) in /var/www/u0835731/data/www/.../wp-admin/includes/misc.php on line 1252
Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0835731/data/www/.../wp-admin/includes/plugin.php:1392) in /var/www/u0835731/data/www/.../wp-admin/post.php on line 223
Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0835731/data/www/.../wp-admin/includes/plugin.php:1392) in /var/www/u0835731/data/www/.../wp-includes/pluggable.php on line 1265
Warning: Cannot modify header information - headers already sent by (output started at /var/www/u0835731/data/www/.../wp-admin/includes/plugin.php:1392) in /var/www/u0835731/data/www/.../wp-includes/pluggable.php on line 1268
Как его убрать и сделать так, чтоб больше не выползало? При предыдущем обновлении вордпресс такого не было.
Вроде как проблема с этим куском в файле plugins.php, но что тут не так и что править не могу понять:
if ( $position >= count( $submenu[ $parent_slug ] ) ) {
$submenu[ $parent_slug ][] = $new_sub_menu;
} else {
// Test for a negative position.
$position = max( $position, 0 );
if ( 0 === $position ) {
// For negative or <code>0</code> positions, prepend the submenu.
array_unshift( $submenu[ $parent_slug ], $new_sub_menu );
} else {
// Grab all of the items before the insertion point.
$before_items = array_slice( $submenu[ $parent_slug ], 0, $position, true );
// Grab all of the items after the insertion point.
$after_items = array_slice( $submenu[ $parent_slug ], $position, null, true );
// Add the new item.
$before_items[] = $new_sub_menu;
// Merge the items.
$submenu[ $parent_slug ] = array_merge( $before_items, $after_items );
}
}