After using Zhimeng cms to build the website, a new column was created, and everything was normal when adding an article. However, when opening this article again for editing, the following error occurred. What is the situation?
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
In combination with the online method, two modifications are needed to solve the problem (this did not happen before, but it appeared in php 7, which should be the previous problem of the dream version of dedecms):
1. Open to find the code of line 51 in/include/taglib/channel/img.lib.php
$innerTmp = $arcTag->GetInnerText();
Replace the above code with:
$innerTmp = ($arcTag=="") ? trim($arcTag) : trim($arcTag->GetInnerText());
2. Open/include/customfields.func.php and find line 539:
$fvalue = trim($ntag->GetInnerText());
Replace with:
$fvalue = $ntag=="" ? trim($ntag) : trim($ntag->GetInnerText());
This can be solved perfectly.