Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 警告:无法将空字符串分配给字符串偏移量wordPress 4.9.5_Php_Wordpress - Fatal编程技术网

Php 警告:无法将空字符串分配给字符串偏移量wordPress 4.9.5

Php 警告:无法将空字符串分配给字符串偏移量wordPress 4.9.5,php,wordpress,Php,Wordpress,警告:无法将空字符串分配给第426行的/home/bofi9rpybgx8/public_html/stagging/hello/wp includes/class.wp-scripts.php中的字符串偏移量 我注意到网络中某个地方的问题,尝试替换第426行中的内容 foreach ( (array) $l10n as $key => $value ) { if ( !is_scalar($value) ) continue;

警告:无法将空字符串分配给第426行的/home/bofi9rpybgx8/public_html/stagging/hello/wp includes/class.wp-scripts.php中的字符串偏移量


我注意到网络中某个地方的问题,尝试替换第426行中的内容

        foreach ( (array) $l10n as $key => $value ) {
        if ( !is_scalar($value) )
            continue;

        $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
    }


我注意到网络中某个地方的问题,尝试替换第426行中的内容

        foreach ( (array) $l10n as $key => $value ) {
        if ( !is_scalar($value) )
            continue;

        $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');
    }


对于此解决方案,您需要在行号处替换此代码

发件人:

    foreach ( (array) $l10n as $key => $value ) {
        if ( ! is_scalar( $value ) ) {
            continue;
        }

        $l10n[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
    }
致:


因为在我的站点中,它显示:只有第一个字节将被分配给字符串偏移量错误,这就是为什么我要检查偏移量$key-它是否为空。是的,它对我有效。

对于此解决方案,您需要在您的行号处替换此代码

发件人:

    foreach ( (array) $l10n as $key => $value ) {
        if ( ! is_scalar( $value ) ) {
            continue;
        }

        $l10n[ $key ] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8' );
    }
致:


因为在我的站点中,它显示:只有第一个字节将被分配给字符串偏移量错误,这就是为什么我要检查偏移量$key-它是否为空。是的,它对我有用。

什么是line
426
。这是lineYo的一个位置。你做错了什么。不管怎样,当您与我分享这一行时,我非常高兴。这可能与第426行中的内容重复。这是lineYo的位置。你做错了什么。我很高兴你能与我分享这一行。可能是