Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Hello,
I am using ZenCart v1.3.7. I am having a problem accessing some of my customer's info (and editing it) in the admin. When I go to the Customers page in the admin I get this message above the customers list (but not on all the pages):
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/xxxx/public_html/store/admin/customers.php on line 1025
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/xxxx/public_html/store/admin/customers.php on line 1027
Warning: reset() [function.reset]: Passed variable is not an array or object in /home/xxxx/public_html/store/admin/includes/classes/object_info.php on line 29
Warning: Variable passed to each() is not an array or object in /home/xxxx/public_html/store/admin/includes/classes/object_info.php on line 30
I did transfer customers from an old install to a new install and I have a feeling that may have caused it, although why only some have the error and others don't, I do not know why since they are also from the old database.
I am not sure how to fix this, but I would appreciate some help. The website is at http://store.chscrapbooks.com if that helps at all.
Thanks
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
You say you transfered customers into the new install from an old install.
I'm assuming that they weren't the same version, or that they are the same version yet the new version doesn't have all the same mods as the old install.
The best practice when transferring data from one db to another is to take the data from both databases and match up the info in a spreadsheet, so that the data matches the column heading.
It sounds to me like you just imported without looking at the layout of the fields in all the different customer tables.
Also, did you import all of the customer data? There are several tables that pertain to customers, you may have added the customers names without adding the cross reference to the customers id so that the customer can't be tied to the other relevant data to that customer.
I hope that makes some kind of sense. hehe.
JP
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Quote:
Warning: Variable passed to each() is not an array or object in /home/xxxx/public_html/store/admin/includes/classes/object_info.php on line 30
Which contribution did you used in result of this error message ?
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
See this is one of the things that pisses me off about Zen Cart. Without Easy Populate, you can't export and import various aspects of the shop with ease.
I hope they decide to include these features in EP soon.
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
@birdoasis
when you say "adding the cross reference to the customers id" how should we do it or what should i look out for? i understand that customer db and customer info db must match.... i also encountered same error above
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
I've imported customers to a new install before without any problems (well actually imported the entire store) by doing the following:
1. Update the old ZenCart to the newest version.
2. Install the newest version of ZenCart on the new server
3. Export the database from the old. Select Drop Tables.
4. Drop all tables from the new. (probably redundant).
5. Import the database to the new
4. Copy the includes, admin, and images folders from the old to the new
5. Make sure includes/config.php and admin/include/config.php has correct settings in the new.
I've done this multiple times and never had a problem before today.
What happened today is when I went to delete customers through the ZenCart admin in the new, I got the errors mentioned above for some of them.
One thing that is different today: in the old which had 1.3.8, I clicked to install the latest patch.
In the new, I installed 1.3.8 with patch.
Any chance the a fresh install of 1.3.8 with patch isn't exactly the same as an old install of 1.3.8 and and then adding the patch?
Hmm...
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Quote:
Originally Posted by
susb8383
One thing that is different today: in the old which had 1.3.8, I clicked to install the latest patch.
You can't "click" to install the latest patch, only to download it. It still needs to be installed according to the instructions.
Quote:
Originally Posted by
susb8383
In the new, I installed 1.3.8 with patch
You can't do this either. It's not included in 1.3.8. The patch still needs to be downloaded and installed.
Provided it is installed correctly, it doesn't matter when it's done, the end result is the same.
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
I just ran into this too! :frusty:
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
Hello
I am facing the same problem, any body could find a solution to this plz?
Re: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in
This is a basic PHP error that could occur almost anywhere, and is most likely caused by sloppy coding in one of the add-ons you're using. In the absence of any details about the errors or how you have modified your cart, it's not possible to be more specific.