Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    24
    Plugin Contributions
    0

    Default Fatal error: Cannot use object of type queryFactoryResult as array

    Hi all,

    There appears to have been a recent problem with our webhost, and a site I've created using Zencart seems to have been affected. Hopefully someone will have more of a clue how to fix this than me!

    On the front page of the shop, I receive 2 errors. The first one:

    Fatal error: Cannot use object of type queryFactoryResult as array in /home/jaglass/public_html/includes/modules/ZC03C00178/new_products.php on line 73

    Line 73 in new_products.php: $product_info_str .= '<td class="productBoxHeading"><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $product['products_name'] . '</a></td>';

    And the second error:

    Fatal error: Call to a member function Execute() on a non-object in /home/jaglass/public_html/includes/functions/sessions.php on line 61

    Line 61 in sessions.php: $total = $db->Execute($qid);

    If anyone can help I'd appreciate it.

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

    Default Re: Fatal error: Cannot use object of type queryFactoryResult as array

    What version of Zen Cart?
    What addons/contributions are installed?
    What version of PHP and MySQL?
    Was the PHP version upgraded recently?
    .

    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
    Sep 2005
    Posts
    24
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot use object of type queryFactoryResult as array

    Hi DrByte,

    What version of Zen Cart? Zen Cart 1.3.8, Database Patch Level: 1.3.8
    What addons/contributions are installed? None, just an aftermarket skin and lightbox
    What version of PHP and MySQL? PHP Version: 5.2.5, MySQL version: 4.1.22
    Was the PHP version upgraded recently? nope

    thanks for any help

    // edit - here is a link to the website: http://www.jaglass.co.uk

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

    Default Re: Fatal error: Cannot use object of type queryFactoryResult as array

    Quote Originally Posted by mk1_salami View Post
    Fatal error: Cannot use object of type queryFactoryResult as array in /home/jaglass/public_html/includes/modules/ZC03C00178/new_products.php on line 73

    Line 73 in new_products.php: $product_info_str .= '<td class="productBoxHeading"><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $product['products_name'] . '</a></td>';
    Your custom coding has bugs in it.
    $new_products['products_id'] should likely be $new_products->fields['products_id']
    $product['products_name'] should likely be $product->fields['products_name']

    Quote Originally Posted by mk1_salami View Post
    And the second error:

    Fatal error: Call to a member function Execute() on a non-object in /home/jaglass/public_html/includes/functions/sessions.php on line 61

    Line 61 in sessions.php: $total = $db->Execute($qid);
    If that's what's on your line 61, then your /includes/functions/sessions.php file is *not* from v1.3.8, or has been customized incorrectly.
    .

    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
    Sep 2005
    Posts
    24
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot use object of type queryFactoryResult as array

    Thanks for the help :)

 

 

Similar Threads

  1. v139h Cannot use object of type queryFactoryResult
    By dmagic in forum General Questions
    Replies: 1
    Last Post: 19 Dec 2013, 06:05 PM
  2. Replies: 3
    Last Post: 14 Dec 2009, 10:51 AM
  3. Replies: 3
    Last Post: 11 Nov 2009, 04:37 AM
  4. Error in referrals.php - Cannot use object of type queryFactoryResult as array
    By Agouti in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 3 Jan 2009, 08:25 PM

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