PHP警告从空值问题创建默认对象的解决方案。
解决方案是查找错误的位置,并查看哪些变量未初始化,并直接用于实例化空类:复制代码如下:$ CT =新stdClass();
修改文件相应的代码,如:
复制代码代码如下:如果(!isset($主题{ $ current_theme })){
delete_option('current_theme);
current_theme美元= get_current_theme();
}
CT =新stdClass(美元);
$ct->name = $current_theme;
解决问题。