织梦Dede自定义图片字段报错 Call to a member function GetInnerText()
问题描述
当在织梦Dede中添加自定义图片字段时,前台打开当前栏目列表会出现以下错误:
Fatal error: Call to a member function GetInnerText() on string in /include/taglib/channel/img.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解决方法
-
编辑
customfields.func.php文件- 打开
/include/customfields.func.php文件。 - 找到以下代码:
$fvalue = trim($ntag->GetInnerText()); - 修改为:
$fvalue = ($ntag == "") ? trim($ntag) : trim($ntag->GetInnerText());
- 打开
-
编辑
img.lib.php文件- 打开
/include/taglib/channel/img.lib.php文件。 - 找到以下代码:
$innerTmp = $arcTag->GetInnerText(); - 修改为:
$innerTmp = ($arcTag == "") ? trim($arcTag) : trim($arcTag->GetInnerText());
- 打开

扫码添加技术【解决问题】
专注企业网站建设、网站安全16年。
承接:企业网站建设、网站修改、网站改版、BUG修复、问题处理、二次开发、PSD转HTML、网站被黑、网站漏洞修复等。
专业解决各种疑难杂症,您有任何网站问题都可联系我们技术人员。
本文来自博客园,作者:黄文Rex,转载请注明原文链接:https://www.cnblogs.com/hwrex/p/18513632

浙公网安备 33010602011771号