Good to know that whatever was being done to cause the problem hasn't been done since. :)
To be sure that I was clear, when I stated to review the admin activity logs, those are the logs that are available from the admin panel, admin options on the right side, and then admin activity logs. These are different than the error logs that have been identified. With those logs exported securely to a local computer, they could be reviewed and possibly the action(s) taken just before the occurrence of the errors could be identified. And as said with that knowledge in hand can take the same action to try to generate the error.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
also happen to me when activating/deactivating a product, or adding new products
my version is 1.5.3 (updated from 1.5.1)
exactly the same error
PHP Warning: Creating default object from empty value in ---/admin/categories.php on line 1006
Last edited by sadris; 31 Aug 2014 at 01:50 PM.
I've seen that warning a couple of times, but wasn't able to reproduce it in my test installation (PHP 5.4.27/XAMPP). I believe, however, that the following teeny change to /YOUR_ADMIN/categories.php (around line 1006) will make the PHP interpreter happy:
Code:<?php // Split Page if ($products_query_numrows > 0) { //-bof-20140830-lat9-Make sure that pInfo is an object ... if (!(isset ($pInfo) && is_object ($pInfo))) { $pInfo = new objectInfo (array ()); } //-eof-20140830-lat9 if (empty($pInfo->products_id)) { $pInfo->products_id= $pID; } ?>
Will that same code work for the same error generated on line 1041?
According to DrByte:Code:PHP Warning: Creating default object from empty value in /home/XXXXXX/public_html/XXXXXX/categories.php on line 1041
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
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
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.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
Rick
RixStix (dot) com
aka: ChainWeavers (dot) com