Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Location
    UK
    Posts
    478
    Plugin Contributions
    0

    Default PHP 5.20 | Catchable fatal error | queryFactoryResult | functions_general.php

    Hi All

    Well its been a joy trying to figure out this error, but on looking at PHP 5.2 and the worldpay module I was getting these error messages,

    Catchable fatal error: Object of class queryFactoryResult could not be converted to string in functions_general.php
    but the solution I found is this:

    in includes/functions/functions_general.php

    Code:
      function zen_not_null($value) {
        if (is_array($value)) {
          if (sizeof($value) > 0) {
            return true;
          } else {
            return false;
          }
        } else {
          if (($value != '') && (strtolower($value) != 'null') &&
    (strlen(trim($value)) > 0)) { *** this line here
            return true;
          } else {
            return false;
          }
        }
      }
    replace the whole section of code around line 660 with this:

    Code:
      function zen_not_null($value) {
        if (is_array($value)) {
          if (sizeof($value) > 0) {
            return true;
          } else {
            return false;
          }
        } elseif( is_a( $value, 'queryFactoryResult' ) ) {
          if (sizeof($value->result) > 0) {
            return true;
          } else {
            return false;
          }
        } else {
          if (($value != '') && (strtolower($value) != 'null') &&
    (strlen(trim($value)) > 0)) {
            return true;
          } else {
            return false;
          }
        }
      }
    Its finally resolved my issue ! not sure if it will resolve anyone elses but thought that it might help someone by posting it - I am almost 100% sure its only linked if you have Worldpay set up :) Use at own risk.

    thank you
    Sarah

  2. #2
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: PHP 5.20 | Catchable fatal error | queryFactoryResult | functions_general.php

    Hi, I am the same problems like you, do you are using 1.3.7 of Zen-Cart???

    My server using PHP 5.2.3.

    I am still have not testing this, if successful, I will post here later...

    Otherware, thank you to share this experience and the code.

  3. #3
    Join Date
    Jan 2007
    Posts
    375
    Plugin Contributions
    3

    Default Re: PHP 5.20 | Catchable fatal error | queryFactoryResult | functions_general.php

    Thank you very much, it work on 1.3.7 with PHP 5.3.2

    Tested!!!

 

 

Similar Threads

  1. Replies: 12
    Last Post: 4 Jan 2010, 07:42 PM
  2. PHP Fatal error: Class 'queryFactoryResult' not found
    By timdwyer42 in forum General Questions
    Replies: 5
    Last Post: 5 Nov 2009, 11:48 PM
  3. Catchable fatal error queryFactoryResult
    By ronwong in forum General Questions
    Replies: 1
    Last Post: 2 Sep 2009, 06:13 PM
  4. Replies: 1
    Last Post: 6 May 2008, 03:17 AM
  5. see Catchable fatal error:html_output.php on line 333 !!
    By applese in forum General Questions
    Replies: 10
    Last Post: 5 Aug 2007, 06:34 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