Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Strange error when deleting customers


warleb

Recommended Posts

When I try to delete customers from admin I get the following errors.

 

Warning: reset(): Passed variable is not an array or object in /data01/xxxxxxxx/public_html/music/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /data01/xxxxxxxx/public_html/music/admin/includes/classes/object_info.php on line 18

 

 

 

Does anyone have any ideas?

 

 

Cheers

Warleb

I don't bother doing backups. I love the thrill of screwing it all up!

Link to comment
Share on other sites

paste the code from object_info.php lines 17 and 18 here.

 

the each and reset() functions may only be called when they are set, so the need to be modified to become conditional...

 

If (isset($variablex){ reset($variablex); }
If (isset($variablex){ each($variablex); }

Link to comment
Share on other sites

Hi There,

 

Here is the object_info.php code.

 

<?php

/*

$Id: object_info.php,v 1.6 2003/06/20 16:23:08 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

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);

}

}

}

?>

 

Maybe there is something not correct in here..

I don't bother doing backups. I love the thrill of screwing it all up!

Link to comment
Share on other sites

unknown column error versus this?

how do they match?

I do agree, the error was fixed in the latest update.

 

this would also make it work if I am correct:

// class constructor
function objectInfo($object_array) {
if (isset($object_array)) {
reset($object_array);
while (list($key, $value) = each($object_array)) {
$this->$key = tep_db_prepare_input($value);
}
}
}
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...