babzonboard Posted June 18, 2007 Posted June 18, 2007 Hi I'm new to all of this so please forgive me if i sound like a complete donut. when i click on customers in the oscommerce admin page i get this error Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/babzonbo/public_html/admin/customers.php on line 733 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/babzonbo/public_html/admin/customers.php on line 733 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/babzonbo/public_html/admin/customers.php on line 735 Warning: reset() [function.reset]: Passed variable is not an array or object in /home/babzonbo/public_html/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/babzonbo/public_html/admin/includes/classes/object_info.php on line 18 I discovered this after doing a test purchase, it is also showingin my orders that the total number of orders is 0
Guest Posted August 12, 2007 Posted August 12, 2007 I am having the same problem... did you solved it????
Draeisme Posted February 26, 2008 Posted February 26, 2008 If you are using php version 5, then this might be the answer. It worked beautifully for me. ------- OsCommerce Errors After PHP5 Upgrade After upgrading a OsCommerce 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 To eliminate thee array_merge() errors, edit the admin/customers.php file: Find these lines: $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); and change them to: $customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info); The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin. All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx
Guest Posted March 14, 2008 Posted March 14, 2008 :thumbsup: Yeaaa.. I had the same problem and this worked for me.. thanks a lot..
markeinoz Posted April 9, 2008 Posted April 9, 2008 This works 100%. Recommended. Cheers Markeinoz If you are using php version 5, then this might be the answer. It worked beautifully for me.------- OsCommerce Errors After PHP5 Upgrade After upgrading a OsCommerce 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 To eliminate thee array_merge() errors, edit the admin/customers.php file: Find these lines: $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); and change them to: $customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info); The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin. All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx
shotputty Posted April 15, 2008 Posted April 15, 2008 If you are using php version 5, then this might be the answer. It worked beautifully for me.------- Find these lines: $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); and change them to: $customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info); THANK YOU!!!!!!!!!!!
faustot Posted April 30, 2008 Posted April 30, 2008 also what could be happening (and what was happening to an older install i had) was this error: 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 the above steps fixed this issue when a customer registered. But they did not fix the errors from showing up when the admin entered a customer via the "create account" interface. to fix that, i had to find the following line in the admin/create_account_process.php tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array); and add the following code right after it: $address_id = tep_db_insert_id(); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
blr044 Posted May 27, 2008 Posted May 27, 2008 I also am getting a similar error message, but my reviews: Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /home/brsgift/public_html/admin/reviews.php on line 215 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/brsgift/public_html/admin/reviews.php on line 216 Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /home/brsgift/public_html/admin/reviews.php on line 216 Warning: reset() [function.reset]: Passed variable is not an array or object in /home/brsgift/public_html/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/brsgift/public_html/admin/includes/classes/object_info.php on line 18 While looking for a possible solution, I do not a file admin/create_account_process.php nowhere in the admin folder. I am using RC2a. Thanks. blr044
pingz Posted July 3, 2008 Posted July 3, 2008 Hi, I'm having the following error after the upgrade to PHP5. Can help me? Where should I make the changes to my codes? I can't manage to post new items to my categories now. :( Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/pingz/public_html/admin/categories.php on line 263 Warning: Cannot modify header information - headers already sent by (output started at /home/pingz/public_html/admin/categories.php:263) in /home/pingz/public_html/admin/includes/functions/general.php on line 22 Thanks a lot in advance!!!
mirko007 Posted July 8, 2008 Posted July 8, 2008 In file admin/reviews.php find: $review_info = array_merge($reviews_text, $reviews_average, $products_name); $rInfo_array = array_merge($reviews, $review_info, $products_image); and change it 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);
Hilde Posted July 12, 2008 Posted July 12, 2008 I'm trying to fix a problem in a website that someone else made. Always tricky! This post was of great help to me, because it fixed the warnings on the screen after filling in a form and trying to post it. Now I have still left the problem that the email that is supposed to be send after filling in the form is completely empty. The titel & mailadres however, are correct. I have no knowledge of PHP at all, but I assume it must be somewhere here in this function also ? (This is also the function where I added the (array)-solution from above) function ddc_HandleRequest($parameters, $formTemplate, $mailTemplate, $confirmTemplate, $subjectStart, $fromField) { if ($_SERVER['REQUEST_METHOD']=="POST" && isset($_POST['Verstuur_formulier'])) { $names = array_keys($parameters); foreach ($names as $name) { $bindings[$name] = htmlspecialchars($_POST[$name]); } $errors = ddc_CheckParameters($_POST, $parameters); $defaults = ddc_CreateRadioDefaults($_POST, $parameters); $bindings = array_merge((array)$errors, (array)$bindings, (array)$defaults); if (!$errors) { $postdata = ddc_FillTemplate($mailTemplate, $bindings); $maildata = "--boundary1234\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n" . $postdata; $maildata .= ddc_AddAttachments($parameters, $_FILES, "--boundary1234"); $maildata .= "\r\n--boundary1234--\r\n"; ddc_createAndSendFormattedMail($fromField, $subjectStart . $_POST['naam'], $maildata); $postdata = ddc_FillTemplate($confirmTemplate, $bindings); } else { $postdata = ddc_FillTemplate($formTemplate, $bindings); } echo $postdata; } else { echo ddc_FillTemplate($formTemplate); } } Can someone give me a hint where to look? Thanks!
S-AS Posted January 29, 2009 Posted January 29, 2009 thanks alot, worked like a gem! I've had to do a few changes to upgrade to PHP5...almost there
zonk675 Posted February 21, 2009 Posted February 21, 2009 Very nice. I installed the 'simple registration' contribution and was getting the same errors in the admin>customers when selecting any customer that registered with only the simple registration fields. After editing the customers.php like it said above, everything is proper now. Thanks again...peace
Guest Posted June 21, 2010 Posted June 21, 2010 Hi Guys. I have just recently had this issue of which this fix worked great but I have now found that all similar fields attributing to customer address info are also gone. Including account_history.php, account_history_info.php on the catalog side and invoice.php and packing_slip.php on the admin side. Any ideas on how to fix or what happened are greatly appreciated
chris o Posted July 8, 2010 Posted July 8, 2010 Hi i am having a similar error is there anyone with enought knowledge to diagnose this problem, thanks. Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/c/h/r/chrisaussie/html/admin/applications/forums/sources/classes/forums/class_forums.php on line 2192 Warning: Invalid argument supplied for foreach() in /home/content/c/h/r/chrisaussie/html/admin/applications/forums/sources/classes/forums/class_forums.php on line 2195 line 2192 $memberGroups = array_merge( $memberGroups, explode( ",", IPSText::cleanPermString( $t['mgroup_others'] ) ) ); line 2195 foreach( $memberGroups as $groupId )
signsfor Posted August 21, 2010 Posted August 21, 2010 If you are using php version 5, then this might be the answer. It worked beautifully for me. ------- OsCommerce Errors After PHP5 Upgrade After upgrading a OsCommerce 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 To eliminate thee array_merge() errors, edit the admin/customers.php file: Find these lines: $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); and change them to: $customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info); The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin. All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx
eranga Posted March 2, 2011 Posted March 2, 2011 If you are using php version 5, then this might be the answer. It worked beautifully for me. ------- OsCommerce Errors After PHP5 Upgrade After upgrading a OsCommerce 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 To eliminate thee array_merge() errors, edit the admin/customers.php file: Find these lines: $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); and change them to: $customer_info = array_merge((array)$country, (array)$info, (array)$reviews); $cInfo_array = array_merge((array)$customers, (array)$customer_info); The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin. All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx Thanks ,, Works for me also
nima Posted May 4, 2011 Posted May 4, 2011 That worked flawlessly. Only if we had more members like you :)
dbznss Posted September 22, 2011 Posted September 22, 2011 Thank you!!! Worked like a charm! I actually had both issues, due to upgrading to PHP5. I simply replaces those lines in admin/customers.php and admin/reviews.php, and bing bang boom.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.