1. 程式人生 > >織夢更新列表頁提示Fatal error: Call to a member function GetInnerText() on a non-object 解決方法

織夢更新列表頁提示Fatal error: Call to a member function GetInnerText() on a non-object 解決方法

今天在做一個站時用到了自定義模型,遇到了些問題,在更新列表頁時提示:
Fatal error: Call to a member function GetInnerText() on a non-object in E:\www\include\taglib\channel\img.lib.php on line 51
這個錯誤會在更新自定義模型欄目列表的時候出現,修復此問題方法很簡單。
編輯開啟 \include\taglib\channel\img.lib.php
查詢51行左右:
$innerTmp = $arcTag->GetInnerText();
將其替換為:
$innerTmp = ($arcTag=="") ? trim($arcTag) : trim($arcTag->GetInnerText());
或
if($arcTag==""){
    $innerTmp = trim($arcTag);
}
else{
    $innerTmp = trim($arcTag->GetInnerText());
}
然後就能正常更新列表頁了,問題上解決 。