Getting Smarter Slowly Posted November 13, 2010 Posted November 13, 2010 I tried to go through some of the actions that I would normally go through if I was working the store. I decided to delete my two phoney names that I put in as a customer while testing the email function (it works). When I was in www.mystore.com/admin I went to customers and found this has come up... Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/lgpieco/public_html/admin/customers.php on line 733 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/lgpieco/public_html/admin/customers.php on line 735 These are lines 730 to 737: if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $customers['customers_id']))) && !isset($cInfo)) { $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$customers['entry_country_id'] . "'"); $country = tep_db_fetch_array($country_query); $reviews_query = tep_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers['customers_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); ` $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); $cInfo = new objectInfo($cInfo_array); } Warning: reset() [function.reset]: Passed variable is not an array or object in /home/lgpieco/public_html/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/lgpieco/public_html/admin/includes/classes/object_info.php on line 18 These are the lines from 13 to 20: class objectInfo { // class constructor function objectInfo($object_array) { reset($object_array); while (list($key, $value) = each($object_array)) { $this->$key = tep_db_prepare_input($value); } All entries that were marked with an "*" were filled out when I was creating an account. Now I can not deleate a customer. My question is: What went wrong? You're never too old to learn. Even an old fart like myself loves learn and be creative. ?>if (empty($coffee)) {$coffee=new coffee();}<?
♥geoffreywalton Posted November 13, 2010 Posted November 13, 2010 Try popping this in to google. site:www.oscommerce.com/forums Warning: array_merge() [function.array-merge]: Argument #1 is not an array in For more tips on finding answers have a look at my profile. Cheers G Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Getting Smarter Slowly Posted November 13, 2010 Author Posted November 13, 2010 Thanks Bud! I'll do that today! You're never too old to learn. Even an old fart like myself loves learn and be creative. ?>if (empty($coffee)) {$coffee=new coffee();}<?
Getting Smarter Slowly Posted November 13, 2010 Author Posted November 13, 2010 geoffreywalton you're one heck of a guy! Thanks!!! Here is the info that worked 100% for me too: 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. You're never too old to learn. Even an old fart like myself loves learn and be creative. ?>if (empty($coffee)) {$coffee=new coffee();}<?
FIMBLE Posted November 13, 2010 Posted November 13, 2010 already answered Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Recommended Posts
Archived
This topic is now archived and is closed to further replies.