AllanH Posted December 22, 2004 Posted December 22, 2004 Hello! First of all, big props to the developers and this community :) I'm relatively new to osc, but I really dig it so far. We've been up and running now, smoothly, for a little over a month and during this time I have installed a couple of contribs one at a time and testing as thoroughly as possible after each. The other day I noticed that when I went to 'edit' a customer from the admin panel, it gave me this error: Warning: reset(): Passed variable is not an array or object in /home/freedom/public_html/shredshop/backend/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/freedom/public_html/shredshop/backend/includes/classes/object_info.php on line 18 .... the rest of the page still displays, with the form, but without the customer info populated. Now, I don't know when this bug started to happen as rolling back my admin section a couple of weeks produces the same error. At first I thought it was related to the label print center mod I had just installed, but previous versions of my /admin/ were producing the same result. Upon further investigation, I find that this only effects the first page of results; when I go to the second and subsequent pages, everything works fine. I've gone into object_info.php it's simply a class that contains one function(of the same name) to loop through the contents of an array, so I found where it gets called in customers.php on (my modified install) on line 226: default: $customers_query = tep_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int)$HTTP_GET_VARS['cID'] . "'"); $customers = tep_db_fetch_array($customers_query); $cInfo = new objectInfo($customers); So, I'm assuming that query to grab the customers info is failing and thus not putting an array into objectInfo to traverse, but I don't understand why this would only effect the first page of results, or indeed, why it would fail in the first place ... I don't suppose anyone has any advice on how I should proceed from here? I'm running a linux box with the latest 4.x version of php and apache 1.x and mysql 4.0.22-standard. Many thanks. - Allan PS a very merry xmas to everyone :D
AllanH Posted December 22, 2004 Author Posted December 22, 2004 digging in customers.php a little more I find: $customer_info = array_merge($country, $info, $reviews); $cInfo_array = array_merge($customers, $customer_info); $cInfo = new objectInfo($cInfo_array); could this be the trail I should be on? objectInfo also gets called at the very top of the page in an error handler... this is sure frustrating :(
AllanH Posted December 22, 2004 Author Posted December 22, 2004 still working on this ... I have since completely replaced my customers.php with one from a fresh untar and I still get the damned error :'( this is driving me nuts - and it's a short drive.
Guest Posted December 24, 2004 Posted December 24, 2004 I did a fresh install and now I'm getting the same error. Wasn't happening before. I guess that will teach me. :thumbsup: I'll let you know if I find the solution.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.