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

如果你的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);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值