Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,337
    Plugin Contributions
    94

    Default Re: Shipping estimator not working correctly ERROR MSG.

    Quote Originally Posted by rozdesignz View Post
    it also has the same error message for line 117, 107, 92
    See post #5.

  2. #12
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,754
    Plugin Contributions
    30

    Default Re: Shipping estimator not working correctly ERROR MSG.

    I find this solution as posted in post #5 to cause a problem in the shipping estimator when there are multiple addresses.
    After selecting an address in the pull-down, the page refreshes and the selected address is maintained in the drop-down but the displayed address in incorrect. Tested with two addresses in a new install of 1.51.

    //if($cart->get_content_type() !== 'virtual') {
    require(DIR_WS_CLASSES . 'order.php');
    $order = new order;
    if ($_SESSION['customer_id']) {
    // user is logged in
    if (isset($_POST['address_id'])){
    // user changed address
    $sendto = $_POST['address_id'];
    }elseif ($_SESSION['cart_address_id']){
    // user once changed address
    $sendto = $_SESSION['cart_address_id'];
    // $sendto = $_SESSION['customer_default_address_id'];
    }else{
    // first timer
    $sendto = $_SESSION['customer_default_address_id'];
    }
    $_SESSION['sendto'] = $sendto;
    // set session now
    $_SESSION['cart_address_id'] = $sendto;
    // 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{
    // user not logged in !
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  3. #13
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: PHP 5.4 Error Reporting E_STRICT in E_ALL causing a warning debug log on my site

    Quote Originally Posted by lat9 View Post
    Also occurs for /admin/products_price_manager.php:
    Code:
    [22-Nov-2012 16:18:43 Europe/Berlin] PHP Warning:  Creating default object from empty value in C:\xampp\htdocs\v1.5.1\myadmin\products_price_manager.php on line 476
    
    [22-Nov-2012 16:18:43 Europe/Berlin] PHP Warning:  Creating default object from empty value in C:\xampp\htdocs\v1.5.1\myadmin\products_price_manager.php on line 482
    Hey lat9 did you find a solution for this? Thank you
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  4. #14
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: PHP 5.4 Error Reporting E_STRICT in E_ALL causing a warning debug log on my site

    Any fix on this problem?
    Using Zen Cart 1.5.1

  5. #15
    Join Date
    Apr 2010
    Posts
    269
    Plugin Contributions
    1

    Default Re: PHP 5.4 Error Reporting E_STRICT in E_ALL causing a warning debug log on my site

    Try this one. I found it in the ozpost thread:


    includes/modules/shipping_estimator.php
    Add to line 46:
    Code:
     require_once('includes/classes/http_client.php'); // shipping in basket
    //PHP5.4 fix
    $order = new stdClass();
    /*
    // moved below and altered to include Tare
      // totals info
      $totalsDisplay = '';

  6. #16
    Join Date
    Jun 2009
    Posts
    42
    Plugin Contributions
    0

    Default Re: Shipping estimator not working correctly ERROR MSG.

    I have this one coming up...what do I have to do of the above options to get rid of it (zen 1.5.1 - php 5.4) ?

    HTML Code:
    [21-Jun-2014 16:31:31 Europe/Amsterdam] PHP Warning:  Creating default object from empty value in D:\www\dynamitemagic.nl\www\shop\includes\modules\shipping_estimator.php on line 92
    Also I have a different error log from a payment module (icepay), anyone any idea how to solve it?
    HTML Code:
    [21-Jun-2014 16:46:17 Europe/Amsterdam] PHP Warning:  Creating default object from empty value in D:\www\dynamitemagic.nl\www\shop\includes\modules\payment\icepay.php on line 550
    [21-Jun-2014 16:46:17 Europe/Amsterdam] PHP Warning:  Creating default object from empty value in D:\www\dynamitemagic.nl\www\shop\extras\icepay\notify.php on line 75

    Line 545-572 of ICEPAY.PHP are this:

    HTML Code:
    	function OnPostback()
    	{
    		if ( $_SERVER['REQUEST_METHOD'] != 'POST' ) return false;
    		
    		$this->postback 						= NULL;
    		$this->postback->status					= $_POST['Status'];
    		$this->postback->statusCode				= $_POST['StatusCode'];
    		$this->postback->merchant				= $_POST['Merchant'];
    		$this->postback->orderID				= $_POST['OrderID'];
    		$this->postback->paymentID				= $_POST['PaymentID'];
    		$this->postback->reference				= $_POST['Reference'];
    		$this->postback->transactionID			= $_POST['TransactionID'];
    		$this->postback->consumerName			= $_POST['ConsumerName'];
    		$this->postback->consumerAccountNumber	= $_POST['ConsumerAccountNumber'];
    		$this->postback->consumerAddress		= $_POST['ConsumerAddress'];
    		$this->postback->consumerHouseNumber	= $_POST['ConsumerHouseNumber'];
    		$this->postback->consumerCity			= $_POST['ConsumerCity'];
    		$this->postback->consumerCountry		= $_POST['ConsumerCountry'];
    		$this->postback->consumerEmail			= $_POST['ConsumerEmail'];
    		$this->postback->consumerPhoneNumber	= $_POST['ConsumerPhoneNumber'];
    		$this->postback->consumerIPAddress		= $_POST['ConsumerIPAddress'];
    		$this->postback->amount					= $_POST['Amount'];
    		$this->postback->currency				= $_POST['Currency'];
    		$this->postback->duration				= $_POST['Duration'];
    		$this->postback->paymentMethod			= $_POST['PaymentMethod'];
    		$this->postback->checksum				= $_POST['Checksum'];
    		
    		$this->doLogging( sprintf("Postback: %s", serialize($_POST)) );
    Lines 64-87 of NOTIFY are these:

    HTML Code:
    	if ($notifyCustomer){
    		// Load order data
    		$order_totals = $ICE_module->load_session($ICE_module->orderID);
    		
    		include_once(DIR_WS_CLASSES . 'order.php');
    		
    		// Override default setting
    		$_SESSION['payment'] = 'icepay';
    		$GLOBALS['icepay']->title = $ICE_module->postback->paymentMethod;		
    		
    		// Retrieve order
    		$order = new order($ICE_module->orderID);
    			
    		// E-mail setup
    		for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
    		$order->total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
    		$order->total_tax += zen_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
    		$order->total_cost += $total_products_price;
    The payments do come in and work but the error is created anyway since php 5.4. Maybe anyone can tell if they see anything strange as I am not familiar with any of the php-code :)

    Thanks!

    René
    Last edited by Reneetje; 21 Jun 2014 at 05:51 PM.

  7. #17
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,337
    Plugin Contributions
    94

    Default Re: Shipping estimator not working correctly ERROR MSG.

    I'm pretty sure on the first one, try changing to the following:
    Code:
    	function OnPostback()
    	{
    		if ( $_SERVER['REQUEST_METHOD'] != 'POST' ) return false;
    		
    		$this->postback 						= new stdClass();
    		$this->postback->status				= $_POST['Status'];
    		$this->postback->statusCode				= $_POST['StatusCode'];
    		$this->postback->merchant				= $_POST['Merchant'];
    		$this->postback->orderID				= $_POST['OrderID'];
    		$this->postback->paymentID				= $_POST['PaymentID'];
    		$this->postback->reference				= $_POST['Reference'];
    		$this->postback->transactionID			= $_POST['TransactionID'];
    		$this->postback->consumerName			= $_POST['ConsumerName'];
    		$this->postback->consumerAccountNumber	= $_POST['ConsumerAccountNumber'];
    		$this->postback->consumerAddress		= $_POST['ConsumerAddress'];
    		$this->postback->consumerHouseNumber	= $_POST['ConsumerHouseNumber'];
    		$this->postback->consumerCity			= $_POST['ConsumerCity'];
    		$this->postback->consumerCountry		= $_POST['ConsumerCountry'];
    		$this->postback->consumerEmail			= $_POST['ConsumerEmail'];
    		$this->postback->consumerPhoneNumber	= $_POST['ConsumerPhoneNumber'];
    		$this->postback->consumerIPAddress		= $_POST['ConsumerIPAddress'];
    		$this->postback->amount					= $_POST['Amount'];
    		$this->postback->currency				= $_POST['Currency'];
    		$this->postback->duration				= $_POST['Duration'];
    		$this->postback->paymentMethod			= $_POST['PaymentMethod'];
    		$this->postback->checksum				= $_POST['Checksum'];
    		
    		$this->doLogging( sprintf("Postback: %s", serialize($_POST)) );
    The second one's a bit different; I'm assuming that my counting is correct and that line 75 is this one:
    Code:
    $order = new order($ICE_module->orderID);
    Based on that, my best guess is the the $ICE_module object doesn't include an orderID element.

  8. #18
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Shipping estimator not working correctly ERROR MSG.

    Quote Originally Posted by Reneetje View Post
    I have this one coming up...what do I have to do of the above options to get rid of it (zen 1.5.1 - php 5.4) ?

    HTML Code:
    PHP Warning: Creating default object from empty value in \includes\modules\shipping_estimator.php on line 92
    https://github.com/zencart/zencart/c...b2a714a7c850cf
    .

    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.

  9. #19
    Join Date
    Jun 2009
    Posts
    42
    Plugin Contributions
    0

    Default Re: Shipping estimator not working correctly ERROR MSG.

    @Dr. Byte

    Thank you, I replaced the entire file with the github version, now see if it works....

    @Lat9

    Also Thank you! If I fix the first file but not the second (as I do not know how to), can I break the plugin? Otherwise I will leave it like it is for now.

    I also emailed the people at ICEPAY to make the module for php5.4 a few days ago but did not get a reply yet.

    Mmmm....I will wait if I get a reply from icepay and then see what to do, do you think the error is created before going to the icepay-paymentpage or on the postback?

    Then I know what to test :)

    René

  10. #20
    Join Date
    Nov 2014
    Location
    London
    Posts
    15
    Plugin Contributions
    0

    Default Re: [UNDER REVIEW] PHP 5.4 PHP Warning: Creating default object from empty value

    Quote Originally Posted by torvista View Post

    PHP Code:
      if (empty($pInfo->products_id)) {
    $pInfo = new stdClass();    
    $pInfo->products_id$pID
    I using ZC v 1.5.1 and got exactly the same error
    PHP Code:
    PHP Warning:  Creating default object from empty value in /home2/footy/public_html/xxxx/categories.php on line 1015 
    but adding the line didn't fix the problem. Error only happens when product set to Priced by Attributes. No errors for products without attributes.

    Please advise.
    Last edited by ksivv; 7 Dec 2014 at 04:25 AM.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 7 Sep 2016, 03:42 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: 10
    Last Post: 6 Sep 2014, 02:55 AM
  4. v151 "PHP Warning: Creating default object from empty value" what is this?
    By gsmsalers in forum General Questions
    Replies: 3
    Last Post: 9 May 2014, 06:54 PM
  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