时间:2015-05-22 11:04作者:sa人气:3533
ecshop自定义栏目里,添加栏目报错Warning: Illegal string offset 'cat_name' in D:wampwwwyjy_shopadminnavigator.php on line 382
解决办法如下:
找到navigator.php文件下的function get_sysnav()
替换成
function get_sysnav()
{
global $_LANG;
$sysmain = array(
array($_LANG['view_cart'],'flow.php'),
array($_LANG['pick_out'],'pick_out.php'),
array($_LANG['group_buy_goods'],'group_buy.php'),
array($_LANG['snatch'],'snatch.php'),
array($_LANG['tag_cloud'],'tag_cloud.php'),
array($_LANG['user_center'],'user.php'),
array($_LANG['wholesale'], 'wholesale.php'),
array($_LANG['activity'], 'activity.php'),
array($_LANG['myship'], 'myship.php'),
array($_LANG['message_board'], 'message.php'),
array($_LANG['quotation'], 'quotation.php'),
);
$sysmain[] = array('-','-');
$catlist = array_merge(cat_list(0, 0, false), array('-'), article_cat_list(0, 0, false));
foreach($catlist as $key => $val)
{
if(is_array($val))
{
$val["view_name"] = $val["cat_name"];
for($i=0;$i<$val['level'];$i++)
{
$val["view_name"] = ' ' . $val["view_name"];
}
$val["url"] = str_replace( '&', '&', $val["url"]);
$val["url"] = str_replace( '&', '&', $val["url"]);
$sysmain[] = array($val["cat_name"], $val["url"], $val["view_name"]);
}
}
return $sysmain;
}
网友评论