Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  styleseye : (24 April 2014 - 02:29 PM) Https://www.facebook.com/l.php?u=Https://www.youtube.com/watch?v=Geh4Rs-Boh8&feature=Youtu.be&h=Taqexxpem
@  styleseye : (24 April 2014 - 02:28 PM) Https://www.facebook.com/l.php?u=Https://www.youtube.com/watch?v=Geh4Rs-Boh8&feature=Youtu.be&h=Taqexxpem
@  yordan : (21 April 2014 - 09:11 PM) Hey, Ritesh, Did You Hear Me?
@  yordan : (14 April 2014 - 05:28 PM) By The Way, This Could Be An Interesting Subject For A Topic, What About Posting This Question? Let's See If Other People Have The Same Feeling Concerning Bootlists!
@  yordan : (13 April 2014 - 09:36 AM) Boot Order : Cd, [Usb,] Hard Drive :D
@  yordan : (11 April 2014 - 07:23 PM) I Simply Let The Bios Do That
@  Ritesh : (11 April 2014 - 10:23 AM) Is It Possible To Launch Fedora Live Cd Or Installation Disk From Hard Drive On Windows Platform Using Grub Mbr File.
@  Ritesh : (11 April 2014 - 10:21 AM) No U Are Not.. Btw.. I Have Question For You.
@  yordan : (10 April 2014 - 08:02 AM) You Are Partially Right.
I Was Not.
Nevertheless, I Am Again :)
@  Ritesh : (09 April 2014 - 07:33 PM) :P
@  Ritesh : (09 April 2014 - 07:33 PM) I Think U R Not..
@  yordan : (09 April 2014 - 09:28 AM) I'm The Master Of The Shoutbox!
@  yordan : (05 April 2014 - 10:32 PM) He-He
@  Ritesh : (04 April 2014 - 06:59 PM) Ha Ha Ha ....
@  yordan : (04 April 2014 - 11:15 AM) Welcome Back, Starscream!
@  yordan : (03 April 2014 - 02:31 PM) And I Hope That He Will Come Back Soon :)
@  yordan : (01 April 2014 - 02:53 PM) Nice, Ritesh Came, I'm Not Home Alone Today.
@  Ritesh : (01 April 2014 - 08:51 AM) Oh!!! Poor Dear Yordan..
@  yordan : (31 March 2014 - 10:02 AM) I'm A Poor Lonesome Cow-Boy
@  yordan : (27 March 2014 - 02:22 PM) He Is Unpatient Due To His Patients!

Photo
- - - - -

OSCommerce Errors Passed variable is not an array or object


5 replies to this topic

#1 demolaynyc

demolaynyc

    Premium Member

  • Members
  • 330 posts

Posted 01 January 2007 - 03:45 AM

I don't know where this topic is appropriate in so please move it if it's innapropriate for this place as this involves PHP and OSCommerce

Hi, I got an error stating the following:

Warning: reset(): Passed variable is not an array or object in /home/content/j/w/s/jws8118/html/catalog/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /home/content/j/w/s/jws8118/html/catalog/admin/includes/classes/object_info.php on line 18


Here's the source 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 (c) 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);
	  }
	}
  }
?>


More problems are that my client can't add products to his cart. He also cannot upload any new products to the categories.

I'm asking the PHP programmers who have experience with OS Commerce and also those who know this to please help me with this problem. My client needs this problem fixed as soon as possible. I need solutions ASAP. Thank you.

#2 Mark420

Mark420

    The Modernator

  • Members
  • 486 posts
  • Gender:Male
  • Location:The Interweb!

Posted 01 January 2007 - 12:52 PM

Hmm i dont use OScommerce ...I use Vurtua mart ...i found it much better and much better to hack it for your needs and a lot of support on thier forums..
Have you tried the Os forums?

Maybe try to backup the mysql db then remove Os commerce then reinstall with default values then replace the old db back in? that may work :)

#3 ginginca

ginginca

    Premium Member

  • Members
  • 250 posts
  • Location:The net (or at least that's what my family says)

Posted 03 January 2007 - 01:15 PM

I have done a number of OSC sites myself, but my programming knowledge is weak.

Have you posted this on the OSC forum, or done a search for the error message on that forum.

Just as a side note ... I have started using Zen Cart for my E-Commerce projects. It is based on OSC, but to compare, it's like OSC on steroids.

#4 Guest_mastercomputers_*

Guest_mastercomputers_*
  • Guests

Posted 08 January 2007 - 04:00 AM

This may not be the right way to go about it as I don't know what information is being passed to this class, but you could do:

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

That will just insure that $object_array is an array, so that these methods that expect arrays can still continue without any warnings, however, they're just warnings and can usually be ignored, you just have to make sure that your error_reporting doesn't display them.

Cheers,

MC

#5 demolaynyc

demolaynyc

    Premium Member

  • Members
  • 330 posts

Posted 09 January 2007 - 04:52 PM

Thanks for the help. But we found out that it was because of the settings of the domain. The main domain's path had to be rerouted to the root folder.

#6 Guest_FeedBacker_*

Guest_FeedBacker_*
  • Guests

Posted 02 June 2008 - 08:22 AM

Replying to demolaynyc
Hey! I have exactly the same problem... Can you please tell me more about this server setting and how to fix it up?
10x in advance!

-reply by Sergey



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users