欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!

报错模式:

PHP Warning: Illegal string offset 'special' in E:\xxx...\wwwroot\论坛\forumdata\templates\1_post_newthread.tpl.php on line 380
PHP Warning: Illegal string offset 'special' in E:\xxx...\wwwroot\论坛\forumdata\templates\1_post_newthread.tpl.php on line 382

原由:晋级PHP版本后出现报错题目
论坛版本:Discuz! 6.1.0

打点方法:

找到\bbs\forumdata\templates\1_post_newthread.tpl.php

掀开1_post_newthread.tpl.php文件,最佳使用DW软件发展编纂,防御记事本编辑涌现网页乱码问题。

找到378行

将如下代码: 

<? if($special == 1) { ?>
后盾质料
<? } elseif($thread['special'] == 2 && $isfirstpost) { ?>
柜台商品简介
<? } elseif($thread['special'] == 2 && $special == 2) { ?>
商品形貌
<? } elseif($special == 3 && $allowpostreward) { ?>
填补资料
<? } elseif($special == 4 && $allowpostactivity) { ?>
勾当说明
<? } elseif($special == 5) { ?>
<? if($allowpostdebate && $isfirstpost || $action == 'newthread') { ?>
靠山原料
<? } else { ?>
态度
<? } ?>
<? } else { ?>
形式
<? } ?>

修正为

<? if(is_array($val))
{if($special == 1) { ?>
背景资料
<? } elseif($thread['special'] == 2 && $isfirstpost) { ?>
柜台商品介绍
<? } elseif($thread['special'] == 2 && $special == 2) { ?>
商品描述
<? } elseif($special == 3 && $allowpostreward) { ?>
增补资料
<? } elseif($special == 4 && $allowpostactivity) { ?>
活动注明
<? } elseif($special == 5) { ?>
<? if($allowpostdebate && $isfirstpost || $action == 'newthread') { ?>
后援资料
<? } else { ?>
立场
<? } ?>
<? } else { ?>
模式
<? }} ?>

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h53455.shtml