织梦自定义图片字段报错 Call to a member function GetInnerText()

COS、CDN

问题

  • 添加自定义图片字段时,前台打开当前栏目列表出现 Fatal error: Call to a member function GetInnerText() on string 错误。

解决方法

  1. 修改 customfields.func.php 文件

    • 打开 /include/customfields.func.php 文件,搜索:
       
       
      $fvalue = trim($ntag->GetInnerText());
    • 修改为:
       
       
      $fvalue = ($ntag == "") ? trim($ntag) : trim($ntag->GetInnerText());
  2. 修改 img.lib.php 文件


    • $innerTmp = $arcTag->GetInnerText();
    • 修改为:
       
       
      $innerTmp = ($arcTag == "") ? trim($arcTag) : trim($arcTag->GetInnerText());

 

COS、CDN
热门