使用织梦cms建完网站以后,新建了个栏目,添加文章时一切正常,但是,当再此打开这个文章进行编辑时,就出现了下面的错误,这是什么情况呢?
Fatal error: Uncaught Error: Call to a member function GetInnerText() on string in /www/wwwroot/www.5imoban.net/include/customfields.func.php:539 Stack trace: #0 /www/wwwroot/www.5imoban.net/woaimoban/inc/inc_archives_functions.php(560): GetFormItemValue(Object(DedeTag), ”, ‘admin’) #1 /www/wwwroot/www.5imoban.net/woaimoban/inc/inc_archives_functions.php(615): GetFormItemValueA(Object(DedeTag), ”) #2 /www/wwwroot/www.5imoban.net/woaimoban/templets/archives_edit.htm(195): PrintAutoFieldsEdit(‘<field:flashpic…’, Array) #3 /www/wwwroot/www.5imoban.net/woaimoban/archives_edit.php(50): include(‘/www/wwwroot/ww…’) #4 {main} thrown in /www/wwwroot/www.5imoban.net/include/customfields.func.php on line 539
结合网上的方法,需要修改两处,即可解决问题(之前没有出现这种情况,换成了php 7就出现了,应该是之前的dedecms织梦版本问题):
1、打开找到/inculde/taglib/channel/img.lib.php,51行所在的代码
$innerTmp = $arcTag->GetInnerText();
将以上代码替换为:
$innerTmp = ($arcTag=="") ? trim($arcTag) : trim($arcTag->GetInnerText());
2、打开/include/customfields.func.php,找到539行:
$fvalue = trim($ntag->GetInnerText());
替换为:
$fvalue = $ntag=="" ? trim($ntag) : trim($ntag->GetInnerText());
这样就可以完美的解决了。
评论前必须登录!
注册