FW:問題Warning: Invalid argument supplied for foreach() in
完善解決方案將報錯的語句做如下修改(例):
把
foreach($extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
改為
if(is_array($extcredits)) //add
{
foreach($extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit; }
}
} //add
或
foreach((array)$extcredits as $id => $credit)
{
if($credit['ratio'])
{
$exchcredits[$id] = $credit;
}
}
在升級 wpmu 時,執行 upgrade 功能遭遇到的問題,如不處理無法升級資料庫等,會導致後續升級等的問題。但該錯誤不但在前端不會顯現,結束時還會出現升級完成的訊息,實際查看 error_log 則可找出發生錯誤的程式行數。
No comments:
Post a Comment