经过多年的良好运行,我在更新到5.42后突然收到了这个可怕的消息。但是,它只在管理员中发生:
Warning: strpos() expects parameter 1 to be string, array given in Warning/home/content/55/html/example/wp-includes/media.php on line 3141
Warning: Cannot modify header information - headers already sent by (output started at /home/content/55/8933555/html/example/wp-includes/media.php:3141) in /home/content/55/8933555/html/example/wp-includes/functions.php on line 6221
Warning: Cannot modify header information - headers already sent by (output started at /home/content/55/8933555/html/example/wp-includes/media.php:3141) in /home/content/55/8933555/html/example/wp-admin/includes/misc.php on line 1282
Warning: Cannot modify header information - headers already sent by (output started at /home/content/55/8933555/html/example/wp-includes/media.php:3141) in /home/content/55/8933555/html/example/wp-admin/admin-header.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at /home/content/55/8933555/html/example/wp-includes/media.php:3141) in /home/content/55/8933555/html/example/wp-includes/option.php on line 961
Warning: Cannot modify header information - headers already sent by (output started at /home/content/55/8933555/html/example/wp-includes/media.php:3141) in /home/content/55/8933555/html/example/wp-includes/option.php on line 962
介质第3140行的代码。php是
if(\'attachment\'===$对象\\u类型| | 0===strpos($object\\u类型,\'attachment:\')){
问题似乎是我的自定义分类法。这是在functions()中创建的。php
function songs_init() {
// create a new taxonomy
register_taxonomy(
\'songs\',
array(
\'label\' => __( \'Songs_Tax\' ),
\'sort\' => true,
\'args\' => array( \'orderby\' => \'term_order\' ),
)
);
}
add_action( \'init\', \'songs_init\' );
当我在媒体中测试有问题的$object\\u类型时。pho并获取var\\u dump(),返回$object\\u type是一个数组:
\'orderby\' => \'term_order\'
我试着在函数中寻找空白和离群字符。php,但我什么都没看到。
下一步该怎么做?同样,在5.42之前的近十年中,这项技术一直运行良好