Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2005
    Posts
    392
    Plugin Contributions
    0

    Default Keep Getting Variable passed to each... Warning message

    I installed a brand new copy of zc137 onto my PC using XAMPP and installed all the mods. used in my live store. Everything went well until I imported a back-up database copy from my live store to the new zc137 copy locally. I keep encountering the following warning message:

    Warning: Variable passed to each() is not an array or object in /home/.../includes/classes/db/mysql/query_factory.php on line 114

    I have tried
    • database upgrade,
    • importing database tables w/o those from mods.,
    • installing zc136 onto a new sub-folder then import a database backup to the new zc136,
    • etc. etc.
    but still the warning persist. Is there anyway to resolve this issue? I have spent 3 weeks to upgrade and now it seems like those time are wasted . I have searched the forum but got no answer. Any advice is greatly appreciated. TIA.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Keep Getting Variable passed to each... Warning message

    It's happening in one of the many database queries. The error message does not tell "which" one. This technically should never happen, but, apparently it does ... presumably because something's got it confused about the data it's seeing (or not seeing).

    A methodical, step-by-step process will be required to narrow it down. Perhaps importing only one table at a time (or groups of related tables), or adding manual debug code to any of zillions of places in your store ... etc.

    Perhaps a place to start is:
    1. What version are you upgrading "from" ?
    2. What addons have you installed on the old cart? Which addons on the "new" cart? Which ones did you intentionally "not" install on the new one?
    3. "where" on the page is this occurring? Can you share a screen-shot, and perhaps paste the View Source data from the browser?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2005
    Posts
    392
    Plugin Contributions
    0

    Default Re: Keep Getting Variable passed to each... Warning message

    Thank you very much for your help DrByte.
    1. What version are you upgrading "from" ?
    I am upgrading from 1.3.6 to 1.3.7
    2. What addons have you installed on the old cart? Which addons on the "new" cart? Which ones did you intentionally "not" install on the new one?
    The following are mods that I have installed in both zc v1.3.6 and zc v1.3.7:
    IH2,
    Encrypted Master Password,
    Improved Attributes Controller,
    Sales Report,
    User Tracking,
    MZMT,
    About Us Page,
    Ask A Question,
    BetterCategoriesEzInfo,
    CAPTCHA Anti-Robot Registration,
    Simple Google Analytics,
    Stock by Attributes,
    Zen Lightbox,
    Scrolling Specials Sidebox,
    Scrolling Whats New Sidebox,
    Future Zen,
    Drop Down Date of Birth Support,
    Cross-Sell Advanced

    These mods. are only in zc v1.3.6
    Alternative Header,
    Ausbank

    New mod. in zc v1.3.7:
    CSS Horizontal Drop Down Menu


    3. "where" on the page is this occurring? Can you share a screen-shot, and perhaps paste the View Source data from the browser?
    These warning messages always appear at the top of the web page. Also, their occurrences are rather unpredictably, sometimes right at the homepage, at times when I click on a category or products. I've attached 2 screenshots and the source data. Hope they can help in pinpointing the "culprit".
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	warning_msg.jpg 
Views:	296 
Size:	18.1 KB 
ID:	1672   Click image for larger version. 

Name:	error_sql_syntax.jpg 
Views:	300 
Size:	23.6 KB 
ID:	1673  
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Keep Getting Variable passed to each... Warning message

    What is your PHP setting for Magic Quotes ? (ie: Admin->Tools->Server Info-> search the screen for "magic_quotes_runtime" ... on or off ?)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Apr 2005
    Posts
    392
    Plugin Contributions
    0

    Default Re: Keep Getting Variable passed to each... Warning message

    Quote Originally Posted by DrByte View Post
    What is your PHP setting for Magic Quotes ? (ie: Admin->Tools->Server Info-> search the screen for "magic_quotes_runtime" ... on or off ?)
    Both Local Value and Master Value for "magic_quotes_runtime" are set to off.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Keep Getting Variable passed to each... Warning message

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

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. Replies: 2
    Last Post: 22 Jan 2007, 12:31 AM

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