1. 程式人生 > >織夢自定義圖片欄位報錯Call to a member function GetInnerText()

織夢自定義圖片欄位報錯Call to a member function GetInnerText()

織夢程式當你添加了自定義圖片欄位時,前臺開啟當前欄目列表就會出現

Fatal error: Call to a member function GetInnerText() on string in include aglibchannelimg.lib.php on line 51

後臺出現

Fatal error: Call to a member function GetInnerText() on a non-object in /include/customfields.func.php on line 539

解決方法

開啟 /include/customfields.func.php 搜尋

$fvalue = trim($ntag->GetInnerText());

改成

$fvalue = ($ntag=="") ? trim($ntag) : trim($ntag->GetInnerText());

繼續開啟 /include/taglib/channel/img.lib.php 搜尋

$innerTmp = $arcTag->GetInnerText();

改成

$innerTmp = ($arcTag=="") ? trim($arcTag) : trim($arcTag->GetInnerText());