Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

purchase order credit account errors


carl tierney

Recommended Posts

Posted

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.

Posted
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.

Posted

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

  • 3 weeks later...
  • 2 weeks later...
Posted

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...