Cannot assign an empty string to a string offset

后端 未结 4 540
走了就别回头了
走了就别回头了 2021-01-21 02:33

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 o         


        
4条回答
  •  臣服心动
    2021-01-21 03:03

    According to bug #71572 it's not permitted to assign empty string. Then use:

    substr(fDomains,1); //like Kris Roofe wrote;
    

    or use solutions like this:

    $fDomainsTmp = $fDomains;
    for($x = 0 ; $x < length($fDomains); $x ++){
        if(condition character allow in string){ 
          $fDomainsTmp .= $fDomains[$x]; 
        }
    }
    $fDomains = $fDomainsTmp;
    

提交回复
热议问题