报错信息:
htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated
打开文件:app/common/controller/Frontend.php
第45行下面,添加:
if (is_array($this->user_info)){
foreach ($this->user_info as $k=>$v){
if (is_null($v)){
//将null重定义为空字符串,避免出现deprecated
$this->user_info[$k]='';
}
}
}
以上代码就是将默认的Null转换为空字符串,页面可以正常打开了。