Mort-lemur Posted January 1, 2014 Posted January 1, 2014 The following error has crept into my admin error log, and I have no idea what is causing it: PHP Warning: array_merge(): Argument #1 is not an array in /home/xxxxx/public_html/admin/customers.php on line 708 PHP Warning: array_merge(): Argument #2 is not an array in /home/xxxxx/public_html/admin/customers.php on line 710 PHP Warning: reset() expects parameter 1 to be array, null given in /home/xxxxx/public_html/admin/includes/classes/object_info.php on line 17 PHP Warning: Variable passed to each() is not an array or object in /home/xxxxx/public_html/admin/includes/classes/object_info.php on line 18 The lines of code are: Customers.php $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); Object_info.php reset($object_array); while (list($key, $value) = each($object_array)) { any Ideas? Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.
PupStar Posted January 1, 2014 Posted January 1, 2014 $customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info); try that from an old post. Mark
♥joli1811 Posted January 1, 2014 Posted January 1, 2014 @@kymation [31-Dec-2013 19:52:46 America/New_York] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #3 is not an array in /home/xxxxxx/public_html/demo9/admin/reviews.php on line 221 [31-Dec-2013 19:52:46 America/New_York] PHP Warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home/xxxxx/public_html/demo9/admin/reviews.php on line 222 [31-Dec-2013 19:52:46 America/New_York] PHP Warning: reset() expects parameter 1 to be array, null given in /home/xxxxxx/public_html/demo9/admin/includes/classes/object_info.php on line 17 [31-Dec-2013 19:52:46 America/New_York] PHP Warning: Variable passed to each() is not an array or object in /home/xxxxxx/public_html/demo9/admin/includes/classes/object_info.php on line 18 [ Fix I done was to change lines to... Line : 75 $rInfo_array = array_merge((array)$reviews, (array)$products, (array)$products_name); $rInfo = new objectInfo($rInfo_array); and lines : 221 to $review_info = array_merge((array)$reviews_text, (array)$reviews_average, (array)$products_name); $rInfo_array = array_merge((array)$reviews, (array)$review_info,(array) $products_image); $rInfo = new objectInfo($rInfo_array); * BUT * http://www.oscommerce.com/forums/tracker/issue-665-adminreviewphp-error-2334/ Jim explained I was only hiding the errors same as you I was upgrading an old database so right enough I was missing data in my Table: reviews or better I had a name John Doe but was missing John Doe's Table:reviews_description it seems very similar to me so bug hunting in the data base would be my suggestion. Regards Joli PS: Just seen Marks reply which is similar solution to what I done The thing is it will probably just be hiding the problem !!! To improve is to change; to be perfect is to change often.
burt Posted January 2, 2014 Posted January 2, 2014 This means that some customer information is missing or not in the correct format. PHP Warning: array_merge(): Argument #1 is not an array in /home/xxxxx/public_html/admin/customers.php on line 708 I have emboldened "argument 1": $customer_info = array_merge($country, $info, $reviews); So, for the problematic customer entry, can you (in phpmyadmin) check what their country is... When you imported your DB some of it might have corrupted - I believe that importation of portions of an older DB is the wrong way to go about things, and better is to simply use the full old database, with the extras required (new produt_images table, configuration entries and so on). Future reference for anyone thinking of u/grading.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.