Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jun 2010
    Posts
    145
    Plugin Contributions
    0

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

    New-ish install of 1.5.3 with only one plugin installed (Encrypted Master Password v. 2.0.0). I had one log from 8/8 and one log from 8/10, both of which contained this error:
    Code:
    PHP Warning:  Creating default object from empty value in /home/user/public/catalog/myadmin/categories.php on line 1006
    I checked my version of admin/categories against an unmodified version and they are exactly the same. Any idea what might be causing this? I saw a couple of threads from a year or so ago that PHP 5.4 upgrades were causing some similar issues, but I didn't know if this might be related or not. Thanks! :)

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

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

    Quote Originally Posted by laurelsstitchery View Post
    New-ish install of 1.5.3 with only one plugin installed (Encrypted Master Password v. 2.0.0). I had one log from 8/8 and one log from 8/10, both of which contained this error:
    Code:
    PHP Warning:  Creating default object from empty value in /home/user/public/catalog/myadmin/categories.php on line 1006
    I checked my version of admin/categories against an unmodified version and they are exactly the same. Any idea what might be causing this? I saw a couple of threads from a year or so ago that PHP 5.4 upgrades were causing some similar issues, but I didn't know if this might be related or not. Thanks! :)
    A couple of things can be done to sleuth this out. One is to install a mod that lat9 put together. I think it is called mydebug backtrace. This error is generated at the categories.php file, but the problem occurred somewhere upstream of it.

    The other thing you could do is review your admin activity logs for those dates and identify what was being done around that time frame to support reproducing the error. Then once the above plugin is installed and action taken to reproduce the error, more useful information should be inthe mydebug file to track down what is causing the issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jun 2010
    Posts
    145
    Plugin Contributions
    0

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

    Quote Originally Posted by mc12345678 View Post
    A couple of things can be done to sleuth this out. One is to install a mod that lat9 put together. I think it is called mydebug backtrace. This error is generated at the categories.php file, but the problem occurred somewhere upstream of it.

    The other thing you could do is review your admin activity logs for those dates and identify what was being done around that time frame to support reproducing the error. Then once the above plugin is installed and action taken to reproduce the error, more useful information should be inthe mydebug file to track down what is causing the issue.
    Thanks for the advice. I will get lat9's backtrace installed and see if I can ferret out what's going on. Whatever it is, it doesn't happen very often. I just checked the logs again and there weren't any additional errors, since the one on the 10th. :)

  4. #4
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

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

    Quote Originally Posted by laurelsstitchery View Post
    Thanks for the advice. I will get lat9's backtrace installed and see if I can ferret out what's going on. Whatever it is, it doesn't happen very often. I just checked the logs again and there weren't any additional errors, since the one on the 10th. :)
    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...

  5. #5
    Join Date
    Aug 2014
    Location
    Indonesia
    Posts
    2
    Plugin Contributions
    0

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

    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.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

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

    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;
      }
    ?>

 

 

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