carl tierney Posted May 16, 2008 Posted May 16, 2008 hi i have been having some trouble with the purchase order credit account contribution. i have used it before and it has worked fine, but i now there is some problems with the admin/includes/classes/order_info.php file. this file must be a new addition as in the previous oscommerce sites that i have made this file is not present. the erros are as follows: Warning: reset() [function.reset]: Passed variable is not an array or object in /home/aspects4/public_html/catering/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home/aspects4/public_html/catering/admin/includes/classes/object_info.php on line 18 the code within the file is as follows: <?php 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); } } } ?> if anyone has any suggetions they would be much appreciated thanks, Carl Tierney.
arietis Posted May 18, 2008 Posted May 18, 2008 if anyone has any suggetions they would be much appreciated you should look at the code that is calling the objectinfo constructor. for some reason, the parameter passed to this constructor is not an array, and this is causing your problem. look for something like new objectInfo($var); and make sure $var is initialized as an array.
sfarhan Posted May 19, 2008 Posted May 19, 2008 Hi, Carl Tierney. Try this code ----------------- <?php class objectInfo { function objectInfo($object_array) { $object_array = is_array($object_array) ? $object_array : array($object_array); reset($object_array); while(list($key, $value) = each($object_array)) { $this->$key = tep_db_prepare_input($value); } } } ?> it should work for you Farhan
carl tierney Posted June 3, 2008 Author Posted June 3, 2008 Thanks Farhan, that worked, thanks alot saved me hours of wtf's cheers
threemen Posted June 11, 2008 Posted June 11, 2008 Hi Carl, did you ever get a resolution to your problem with the Admin area / customer details view? As i've also got the same problem after importing new customer details. Cheers Craig
Recommended Posts
Archived
This topic is now archived and is closed to further replies.