无法将空字符串分配给字符串偏移量 [英] Cannot assign an empty string to a string offset
本文介绍了无法将空字符串分配给字符串偏移量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚安装了PHP 7.1,现在看到此错误:
I've just installed PHP 7.1 and now I am seeing this error :
PHP Warning: Cannot assign an empty string to a string offset in /postfixadmin/variables.inc.php on line 31
第31行:
$fDomains[0] = "";
现在如何在PHP 7.1中清除$ fDomains [0]?
How does on clear $fDomains[0] now in PHP 7.1?
推荐答案
这是因为您要在第一个元素上取消设置字符串.只需使用substr($fDomains, 1);
It's because you want to unset a string at the first element. just use substr($fDomains, 1);
这篇关于无法将空字符串分配给字符串偏移量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文