Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Location
    UK
    Posts
    358
    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
    192
    Plugin Contributions
    0

    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
    192
    Plugin Contributions
    0

    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. Suspension from excessive resources all of a sudden
    By chriscana in forum General Questions
    Replies: 9
    Last Post: 28 Feb 2007, 09:45 PM

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
  •