织梦园模板网提供云优cms模板,pbootcms模板,Wordpress主题模板等各类企业新闻资讯网站模板下载服务。织梦园网站模板交流群
用户名:
密码:
注册
注册后享受折扣价

织梦dedecms自定义模型,造成更新列表页出现img.lib.php on line

织梦园模板 / 2019-07-26 / 收藏
  今天在做一个站时用到了自定义模型,遇到了些问题,在更新列表页时提示:

  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());
}

  然后就能正常更新列表页了,问题上解决 。

相关安装使用

收缩