我们使用phpcms建站时,有时候将phpcms站点升级到php7.2会出现文章无法修改了,提示Uncaught Error: [] operator not supported for strings 错误,可能是PHP7以上对语法要求比较严谨,以下青锋建站就照着错误提示来和大家寻找解决方案。
phpcms站点升级到php7.2会出现文章无法修改
Fatal error: Uncaught Error: [] operator not supported for strings in
*****/phpcms/modules/admin/classes/push_api.class.php:145 Stack trace: #0
*****/phpcms/modules/admin/classes/push_api.class.php(50): push_api->position_list(Array, Array, 0, 'content_model') #1
*****/caches/caches_model/caches_data/content_update.class.php(62): push_api->position_update(4, 1, 14, Array, Array, 0) #2
*****/caches/caches_model/caches_data/content_update.class.php(18): content_update->posid('posids', Array) #3
*****/phpcms/model/content_model.class.php(303): content_update->update(Array) #4
*****/phpcms/modules/content/content.php(221): content_model->edit_content(Array, 4) #5
*****/phpcms/libs/classes/application.class.php(31): content->edit() #6
*****/phpcms/libs in
*****/phpcms/modules/admin/classes/push_api.class.php on line 145
打开/phpcms/modules/admin/classes/push_api.class.php,大概在约 141行,
*****/phpcms/modules/admin/classes/push_api.class.php:145 Stack trace: #0
*****/phpcms/modules/admin/classes/push_api.class.php(50): push_api->position_list(Array, Array, 0, 'content_model') #1
*****/caches/caches_model/caches_data/content_update.class.php(62): push_api->position_update(4, 1, 14, Array, Array, 0) #2
*****/caches/caches_model/caches_data/content_update.class.php(18): content_update->posid('posids', Array) #3
*****/phpcms/model/content_model.class.php(303): content_update->update(Array) #4
*****/phpcms/modules/content/content.php(221): content_model->edit_content(Array, 4) #5
*****/phpcms/libs/classes/application.class.php(31): content->edit() #6
*****/phpcms/libs in
*****/phpcms/modules/admin/classes/push_api.class.php on line 145
$fields_arr = $fields_value = '';
将它改为
$fields_arr = $fields_value = [];
保存,上传,覆盖文件,重新编辑一下文章看看,这次果然可以了。以上就是青锋建站给大家分享的将phpcms站点升级到php7.2会出现文章无法修改的问题,青锋建站承接网站建设服务,包括织梦建站,phpcms建站,wordpress建站,CMS系统开发,SEO网站优化,网络营销推广,企业邮箱,400电话。
转载请注明来源网址:青锋建站-http://www.sjzphp.com/cmsxitong/phpcms/qiehuanphp72.html