Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Hello
thank you for the quick reply
I fixed th problem by doing so:
To eliminate thee array_merge() errors, edit the admin/customers.php file:
Find these lines:
Code:
$customer_info = array_merge($country, $info, $reviews);
$cInfo_array = array_merge($customers, $customer_info);
and change them to:
Code:
$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);
$cInfo_array = array_merge((array)$customers, (array)$customer_info);
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
That will certainly deal with the immediate error, where the error shows that its on the customer page (similar errors have been reported elsewhere), but be on your guard for further problems as it may just mask an underlying problem (why the array hadn't been set in the first place) which could then manifest itself elsewhere.
Thanks for posting back the location though, that may be helpful if others suffer this problem.
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
What you've done there is merely mask a problem you've got in the integrity of the data in your database.
You've clearly got broken relationships between your customers, customers_info, and address_book tables. This is ALWAYS caused by importing data incorrectly and/or manually fiddling with data in the database.
You should really fix your database integrity problems instead of merely masking them.
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Hello
thank you Dr byte :| I dunno vry well the structure of Zencart
I added a field to the customer table, you think this is what caused it?
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
could you plz advice me further what to check?
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Quote:
Originally Posted by
joudesign
Hello
thank you for the quick reply
I fixed th problem by doing so:
To eliminate thee array_merge() errors, edit the admin/customers.php file:
Find these lines:
Code:
$customer_info = array_merge($country, $info, $reviews);
$cInfo_array = array_merge($customers, $customer_info);
and change them to:
Code:
$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);
$cInfo_array = array_merge((array)$customers, (array)$customer_info);
thank you,
It's work with my site.
1 Attachment(s)
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
OK I had the same problem and I just downloaded a new version of zencart, registered some test customers and I am getting those lines of errors :
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home1/arabbro1/public_html/pc2all/admin/customers.php on line 1099
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home1/arabbro1/public_html/pc2all/admin/customers.php on line 1101
Warning: reset() [function.reset]: Passed variable is not an array or object in /home1/arabbro1/public_html/pc2all/admin/includes/classes/object_info.php on line 29
Warning: Variable passed to each() is not an array or object in /home1/arabbro1/public_html/pc2all/admin/includes/classes/object_info.php on line 30
I can't even delete any customer!! please check my customers file
:no:
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Either your countries table is empty, or the customer you added is connected to a country which you've deleted from the database.
You can't go deleting data and not encounter errors.
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Thanks DrByte, I fixed it, You maybe right about that because I indeed deleted all the countries from my phpmyadmin side and left only one, for customers also I had to delete them from the phpmyadmin side and when I created a test customer to edit/delete his info, I could do that luckily .. Thanks again ..:clap: