Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,839
    Plugin Contributions
    31

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    I use the search extensively, could a few strategically placed "@" suppress the creation of these logs?
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    Before you bother with suppressing things, where *else* in the admin are you able to trigger the same kind of message?
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,839
    Plugin Contributions
    31

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    I haven't seen it occur anywhere else.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    To get rid of that warning entry in the log file, you can remove those lines causing it, as they're not used. It appears they're leftover from when that file was split into multiples for (slightly) easier maintenance:

    These at 1005-1007 in /admin/categories.php can be removed:
    Code:
    
      if (empty($pInfo->products_id)) {
        $pInfo->products_id= $pID;
      }
    
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,839
    Plugin Contributions
    31

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    Additional information is that prior to commenting-out those lines, I found a note in my categories file at another point
    PHP Code:
    if (empty($pInfo->products_id)) {
        
    //$pInfo = new stdClass();//steve added to 1.53 for php 5.4 and E_STRICT warnings, removed for 1.54, maybe fixed?
        
    $pInfo->products_id$pID;
      } 
    If I re-enable that commented-out declaration, the error log does not occur.

    Which "solution" is recommended, or it really doesn't matter?
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    Your suggestion works; however, I don't see where that object is used after that point in the code, hence the suggestion to simply remove it.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Admin debug logs - Creating default object from empty value - categories search

    Quote Originally Posted by torvista View Post
    Additional information is that prior to commenting-out those lines, I found a note in my categories file at another point
    PHP Code:
    if (empty($pInfo->products_id)) {
        
    //$pInfo = new stdClass();//steve added to 1.53 for php 5.4 and E_STRICT warnings, removed for 1.54, maybe fixed?
        
    $pInfo->products_id$pID;
      } 
    Indeed, you had posted about that very thing in another thread, but it got lost due to hijacked discussions that got added to it. Apologies that it got missed in 1.5.4.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 12
    Last Post: 31 Jul 2017, 11:57 PM
  2. 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
  3. v139h Creating default object from empty value (in shipping modules)
    By Phil S in forum General Questions
    Replies: 11
    Last Post: 6 Nov 2015, 06:46 AM
  4. Replies: 10
    Last Post: 6 Sep 2014, 02:55 AM
  5. Replies: 3
    Last Post: 26 Mar 2014, 07:35 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