|
解決方法是找到報錯的位置然后看哪個變量是沒有初始化而直接使用的,將這個變量先實例化一個空類。如:
復(fù)制代碼 代碼如下:$ct = new stdClass();
修改文件相應(yīng)代碼,如:
復(fù)制代碼 代碼如下:if ( ! isset( $themes[$current_theme] ) ) {
delete_option( 'current_theme' );
$current_theme = get_current_theme();
}
$ct = new stdClass(); <!--添加這行-->
$ct->name = $current_theme;
問題解決。
php技術(shù):php警告Creating default object from empty value 問題的解決方法,轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。