Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Debug file in /logs - PHP Warning: Creating default object from empty value

    Will that same code work for the same error generated on line 1041?
    Code:
    PHP Warning:  Creating default object from empty value in /home/XXXXXX/public_html/XXXXXX/categories.php on line 1041
    According to DrByte:
    www.zen-cart.com/showthread.php?214369-myDEBUG-after-update-to-php-5-4-31
    It's harmless.
    It's a PHP 5.4 issue, where the use of an object element (in this case $pInfo) is assumed to already exist, but in this specific case it doesn't yet. So, the message is telling you that it created the object on-the-fly for you.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,937
    Plugin Contributions
    96

    Default Re: Debug file in /logs - PHP Warning: Creating default object from empty value

    Quote Originally Posted by RixStix View Post
    Will that same code work for the same error generated on line 1041?
    Code:
    PHP Warning:  Creating default object from empty value in /home/XXXXXX/public_html/XXXXXX/categories.php on line 1041
    According to DrByte:
    www.zen-cart.com/showthread.php?214369-myDEBUG-after-update-to-php-5-4-31
    The "stock" version of /YOUR_ADMIN/categories.php has only 1032 lines, so I can't answer the first question without seeing what's 'around' that line in your version.

    While it's a harmless message, my concern is that these "harmless" reports will make people complacent about seeing debug-log files such that they ignore an "important" report.

  3. #3
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Debug file in /logs - PHP Warning: Creating default object from empty value

    Quote Originally Posted by lat9 View Post
    The "stock" version of /YOUR_ADMIN/categories.php has only 1032 lines, so I can't answer the first question without seeing what's 'around' that line in your version.

    While it's a harmless message, my concern is that these "harmless" reports will make people complacent about seeing debug-log files such that they ignore an "important" report.
    I think it is the same line of code. QuickQuantityUpdate referenced in the other thread adds a few lines toward the top which probably caused the lines to shift down that much.

    /admin/categories.php
    Code:
    // Split Page LINE 1038
    if ($products_query_numrows > 0) {
      if (empty($pInfo->products_id)) {
        $pInfo->products_id= $pID;
      }
    ?>
                <td class="smallText" align="center"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_RESULTS_CATEGORIES, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '<br>' . $products_split->display_links($products_query_numrows, MAX_DISPLAY_RESULTS_CATEGORIES, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], zen_get_all_get_params(array('page', 'info', 'x', 'y', 'pID')) ); ?></td>
    
    <?php
    }
    // Split Page LINE 1048
    Yes, I agree since I have started ignoring/deleting the myDebug files since most have been "Ignore them". I thought that I was being helpful in reporting the logs but it doesn't appear helpful at all. PayPal and this one are most frequent. There's really no dedicated area in the forum for questions related to myDebug, the questions tend to get sprinkled around.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,937
    Plugin Contributions
    96

    Default Re: Debug file in /logs - PHP Warning: Creating default object from empty value

    Quote Originally Posted by RixStix View Post
    I think it is the same line of code. QuickQuantityUpdate referenced in the other thread adds a few lines toward the top which probably caused the lines to shift down that much.

    /admin/categories.php
    Code:
    // Split Page LINE 1038
    if ($products_query_numrows > 0) {
      if (empty($pInfo->products_id)) {
        $pInfo->products_id= $pID;
      }
    ?>
                <td class="smallText" align="center"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_RESULTS_CATEGORIES, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '<br>' . $products_split->display_links($products_query_numrows, MAX_DISPLAY_RESULTS_CATEGORIES, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], zen_get_all_get_params(array('page', 'info', 'x', 'y', 'pID')) ); ?></td>
    
    <?php
    }
    // Split Page LINE 1048
    Yes, I agree since I have started ignoring/deleting the myDebug files since most have been "Ignore them". I thought that I was being helpful in reporting the logs but it doesn't appear helpful at all. PayPal and this one are most frequent. There's really no dedicated area in the forum for questions related to myDebug, the questions tend to get sprinkled around.
    Yes, the change that I posted should replace the same fragment in your (larger) file!

    I believe that your reporting of these warnings is quite helpful; many times a warning in one PHP version leads to an error in a later version. I also agree that having a dedicated "I got this debug-log, what does it mean?" forum would be helpful.

 

 

Similar Threads

  1. v139h Warning: Creating default object from empty value in shipping_estimator.php
    By split63 in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 30 Apr 2016, 08:00 PM
  2. Replies: 11
    Last Post: 15 Jan 2015, 05:40 PM
  3. Replies: 20
    Last Post: 7 Dec 2014, 11:29 AM
  4. Replies: 3
    Last Post: 26 Mar 2014, 07:35 PM
  5. Replies: 0
    Last Post: 27 Sep 2012, 11:57 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