欢迎访问全国企业网站设计NO.1网站开发商平台 付款方式
主页 > 网站建设 > 建站知识 > DedeCMS提示"Call to a member function GetInnerText()"解决

DedeCMS提示"Call to a member function GetInnerText()"解决

POST TIME:2020-10-09

今天在做一个站时用到了自定义模型,遇到了些问题,在更新列表页时提示:
 
Fatal error: Call to a member function GetInnerText() on a non-object in E:wwwinclude aglibchannelimg.lib.php on line 51
 
这个错误提示会在更新自定义模型栏目列表的时候出现,修复此问题方法很简单。
 
编辑打开 /inculde/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());
	}
 
然后就能正常更新列表页了,问题上解决 。