Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2008
    Posts
    49
    Plugin Contributions
    0

    Default Creating default object from empty value (in shipping modules)

    v1.3.9h
    PHP Version: 5.6.0
    Database: MySQL 5.5.27-log

    Starting yesterday, my customers are getting the same error message but in the shipping module.
    PHP Warning: Creating default object from empty value in .........Cart\includes\modules\shipping_estimator.php on line 107 and once in line 117.

    It only seems to happen when someone is not logged in.

    I haven't changed anything and can't figure out why this started happening.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    See if adding the code in RED fixes the problem in the file:
    /includes/modules/shipping_estimator.php
    Code:
        // set shipping to null ! multipickjup changes address to store address...
        $shipping='';
        // include the order class (uses the sendto !)
        require(DIR_WS_CLASSES . 'order.php');
        $order = new order;
      }else{
        // include the order class (uses the sendto !)
        require(DIR_WS_CLASSES . 'order.php');
        $order = new order;
        // user not logged in !
        if (isset($_POST['zone_country_id'])){
          // country is selected
          $_SESSION['country_info'] = zen_get_countries($_POST['zone_country_id'],true);
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Mar 2008
    Posts
    49
    Plugin Contributions
    0

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

    That fixed it!

    Thank you!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    Thanks for the update that this worked for you ...

    Do you know if your php recently upgrade?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

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

    Quote Originally Posted by Phil S View Post
    v1.3.9h
    PHP Version: 5.6.0
    Database: MySQL 5.5.27-log

    Starting yesterday, my customers are getting the same error message but in the shipping module.
    PHP Warning: Creating default object from empty value in .........Cart\includes\modules\shipping_estimator.php on line 107 and once in line 117.

    It only seems to happen when someone is not logged in.

    I haven't changed anything and can't figure out why this started happening.
    Just a quick note that your site is an accident waiting to happen. Zen Cart v1.3.9h doesn't include the changes that are required for the PHP interface changes made to the built-in htmlspecialchars and htmlentities functions starting with PHP 5.4 -- the default character set changed from (essentially) ASCII to UTF-8.

  6. #6
    Join Date
    Mar 2008
    Posts
    49
    Plugin Contributions
    0

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

    No according the my son, he hadn't changed anything.

    I suppose it's time to upgrade to v1.5.4 but I'm old and don't like changes. :)

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

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

    Quote Originally Posted by Phil S View Post
    No according the my son, he hadn't changed anything.

    I suppose it's time to upgrade to v1.5.4 but I'm old and don't like changes. :)
    Understood, but it's a lot easier to make a change when you want to instead of when you have to (i.e. when your store is no longer working).

  8. #8
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

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

    Does the below fix also work in 1.5.1? as for some reason i thought the fix was a lot more convoluted than that, just asking as i am about to apply the fix and it just seems so much simpler than last time>

    Quote Originally Posted by Ajeh View Post
    See if adding the code in RED fixes the problem in the file:
    /includes/modules/shipping_estimator.php
    Code:
        // set shipping to null ! multipickjup changes address to store address...
        $shipping='';
        // include the order class (uses the sendto !)
        require(DIR_WS_CLASSES . 'order.php');
        $order = new order;
      }else{
        // include the order class (uses the sendto !)
        require(DIR_WS_CLASSES . 'order.php');
        $order = new order;
        // user not logged in !
        if (isset($_POST['zone_country_id'])){
          // country is selected
          $_SESSION['country_info'] = zen_get_countries($_POST['zone_country_id'],true);
    Webzings Design
    Semi retired from Web Design

  9. #9
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

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

    same error appearing for includes/modules/shipping_rates_in_cart.php

    Apply same fix and it seems to work but making shopping cart page to load slow now. Any idea how to change it so it does not take long to load?

  10. #10
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

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

    Quote Originally Posted by jsarwar View Post
    same error appearing for includes/modules/shipping_rates_in_cart.php

    Apply same fix and it seems to work but making shopping cart page to load slow now. Any idea how to change it so it does not take long to load?
    The fix to the problem as detailed in this thread will *not* be the cause of slow loading pages.

    There *may* be something coincidental going on that is making you think the fix and slowness are related, but for the life of me I can't imagine what the connection would be.

    Cheers
    RodG

 

 
Page 1 of 2 12 LastLast

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. Replies: 11
    Last Post: 15 Jan 2015, 05:40 PM
  4. Replies: 10
    Last Post: 6 Sep 2014, 02:55 AM
  5. Replies: 3
    Last Post: 26 Mar 2014, 07:35 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR