您的位置:首页 > 其它

修复 Warning: Array_merge() [function.array-merge]: Argument #1 Is Not An Array... 错误

2011-04-06 18:30 756 查看
如果你的Zen cart网站使用的是php5的服务器空间,或将php升级为php5的话就会出现这个错误,废话不说,解决方法如下:

--------------------------------------------------------

Zen cart Errors After PHP5 Upgrade

After upgrading a Zen cart site to PHP5 the follow errors occurred when using the customer part of the admin section:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /catalog/admin/customers.php on line 782

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /catalog/admin/customers.php on line 784

Warning: reset() [function.reset]: Passed variable is not an array or
object in /catalog/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18

解决这几个array_merge() 错误, 只需找到并编辑你的admin/customers.php 文件:

找到这两行:

$customer_info = array_merge($country->fields, $info->fields, $reviews->fields);

$cInfo_array = array_merge($customers->fields, $customer_info);


修改为:

$customer_info = array_merge((array)$country->fields, (array)$info->fields, (array)$reviews->fields);

$cInfo_array = array_merge((array)$customers->fields, (array)$customer_info);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐