JohnSmithson Posted March 24, 2006 Posted March 24, 2006 Hello everyone, OsCommerce has seemed to always work well, but today when I tried to edit a product it totally blanked all the information as well as the image for that product. In the admin Categories / Products all I have is a blank line where that product use to be but no info. If I click it it has no info and no image but says when it added, thats it. When I try to edit or add any new product I get this error: Warning: Variable passed to reset() is not an array or object in /home/includes/classes/object_info.php on line 17 Warning: Variable passed to reset() is not an array or object in /home/includes/classes/object_info.php on line 18 I am so confused.java script:emoticon(":'(", smilie Thanks, John
JohnSmithson Posted March 24, 2006 Author Posted March 24, 2006 Anybody have an idea, I am really stumped
Guest Posted March 24, 2006 Posted March 24, 2006 admin/includes/classes/object_info.php - lines 17 and 18: } } ?> So, first off, check that you dont have a closing ?> tag before these. Also, I am a little concerned that you said the error was in home/includes/classes/object_info.php when you should be in your admin folder....?
JohnSmithson Posted March 24, 2006 Author Posted March 24, 2006 Thank you for your reply, This is my code from line 13 to 16 You are right it was in the admin folder my mistake 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); } } } ?>
JohnSmithson Posted March 27, 2006 Author Posted March 27, 2006 OK, I can edit the products using phpAdmin directly and it works. If I use oscommerce to edit the same product it erases it again. I am so stumped.
JohnSmithson Posted March 29, 2006 Author Posted March 29, 2006 For those who might be interested, My ISP reinstalled PHP on our server. By default I was told that php shorthand is turned off, and apparantly OsCommerce is written in shorthand. Everything is all and well now. Thanks again John
Guest Posted March 29, 2006 Posted March 29, 2006 and apparantly OsCommerce is written in shorthand. I don't think so. You can download the default zip archive and check them. They use the long form. Perhaps some contributions or other scripts you installed caused the problem.
JohnSmithson Posted March 29, 2006 Author Posted March 29, 2006 Thank you for the correction, Our site does have several different contributions installed. What a headache till it was fixed though.
elchavobeer Posted April 12, 2006 Posted April 12, 2006 I'm having the same problem, what did you need or your ISP do to get this fixed? Es que se me chispotio! Eso, Eso, Eso!
elchavobeer Posted April 13, 2006 Posted April 13, 2006 I was having the same error as JohnSmithson, could not add a new item or upload a picture, I looked around for quite some time, tried different solutions but nothing worked. Until, that is, I tried adding an item with a browser other than Firefox! It works fine in Mozilla and in Konqueror (under linux) but I still cannot get it to work properly in Firefox, even after clearing out the cache. If you are having this same problem, try a different browser. It doesn't make sense to me, Firefox has always worked fine before, but I thought I'd pass it on, maybe it'll save somebody a terrible amount of hours! :wacko: Es que se me chispotio! Eso, Eso, Eso!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.