欢迎光临
我们一直在努力

dedecms织梦:Call to a member function GetInnerText() 报错解决方法

使用织梦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());

 

这样就可以完美的解决了。

赞(0) 打赏
未经允许不得转载:新起点博客 » dedecms织梦:Call to a member function GetInnerText() 报错解决方法


关注公众号『新起点软件管家』

获取最新网络资源及破解软件!
带你玩转各样软件...

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏