Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    11
    Plugin Contributions
    0

    Default Warning: reset(): Passed variable is not an array or object

    Hi guys. I'm using 1.3.8, the latest.

    I am unable to add products to my catalog! I receive these errors every time I try, after filling in all the info and clicking "preview":

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/content/d/f/d/dfdancewear/html/admin/includes/classes/object_info.php on line 29

    Warning: Variable passed to each() is not an array or object in /home/content/d/f/d/dfdancewear/html/admin/includes/classes/object_info.php on line 30

    I'm clueless because everything else seems to be working fine

  2. #2
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Warning: reset() [function.reset]: Passed variable is not an array or object

    Start by looking at object_info.php line 30. what's it referring to?

    When did you notice this error and what were you changing or modifying just before it happened?

    If you've changed some files just prior to this then revert back to the backup versions and see if you can solve it be reversing everything you've done just prior.

  3. #3
    Join Date
    Apr 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: Warning: reset() [function.reset]: Passed variable is not an array or object

    Quote Originally Posted by limelites View Post
    Start by looking at object_info.php line 30. what's it referring to?
    Code:
    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers                           |
    // |                                                                      |   
    // | http://www.zen-cart.com/index.php                                    |   
    // |                                                                      |   
    // | Portions Copyright (c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    //  $Id: object_info.php 1969 2005-09-13 06:57:21Z drbyte $
    //
    
      class objectInfo {
    
    // class constructor
        function objectInfo($object_array) {
    //this line should be added, but should be tested first:
    //      if (!is_array($object_array)) return;
          reset($object_array);
          while (list($key, $value) = each($object_array)) {
            $this->$key = zen_db_prepare_input($value);
          }
        }
      }
    ?>
    No idea..

    Quote Originally Posted by limelites View Post
    When did you notice this error and what were you changing or modifying just before it happened?
    I haven't modified any files, the website has been untouched for a week or so. I added a 'test' product a couple weeks ago, deleted it today, and then tried to add another one but received the above errors. I noticed it today upon trying to add a product.

    Quote Originally Posted by limelites View Post
    If you've changed some files just prior to this then revert back to the backup versions and see if you can solve it be reversing everything you've done just prior.
    Nope.

  4. #4
    Join Date
    Nov 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Warning: reset(): Passed variable is not an array or object

    I've got the same error in a cart version 1.3.8a, which has not had any changes for many months. The error DOES NOT appear in the browser page. You can only see it if you view source. Could someone else check their cart and see if they have the same error?

  5. #5
    Join Date
    Jan 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Warning: reset(): Passed variable is not an array or object

    Hi people!

    I was having this exact error, and found that it was only happening on a couple of items. Turns out it was because I had forgotten to resize the images for those two. The images were 4.5MB and after I resized them to less than 200kb they worked just fine.

 

 

Similar Threads

  1. v151 Warning: Variable passed to each() is not an array or object
    By caprimia in forum General Questions
    Replies: 2
    Last Post: 1 Feb 2013, 06:16 AM
  2. Replies: 4
    Last Post: 1 May 2009, 06:47 AM
  3. Help me please!!"Warning: Variable passed to each() is not an array or object"
    By delequah in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 11 Aug 2007, 11:14 AM
  4. Replies: 2
    Last Post: 22 Jan 2007, 12:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR