Zen Cart Logo
Forums / Bug Reports / [Done v1.5.4] PHP 5.4 PHP Warning: Creating default object from empty value

[Done v1.5.4] PHP 5.4 PHP Warning: Creating default object from empty value

Locked

Views: 19,630

Results 21 to 21 of 21
This thread is locked. New replies are disabled.
7 Dec 2014, 10:29 AM
#21
ksivv avatar

ksivv

New Zenner

Join Date:
Nov 2014
Location:
London
Posts:
15
Plugin Contributions:
0

[Done v1.5.4] PHP 5.4 PHP Warning: Creating default object from empty value

ksivv:

I using ZC v 1.5.1 and got exactly the same error

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.
Sorted. Problem was with Big Royal mail. I found fix in this trade: <http://www.zen-cart.com/showthread.php?198005-Big-Royal-Mail-3-0/page12>

> You need to change the quote.php which can be found in YOUR_SHOPPING_CART_DIRECTORY/includes/modules/shipping/BigRoyalMail
> you need to replace line 57
> ```
$products_list = $_SESSION['cart']->get_product_id_list();

with

$products_list = '';
if (is_array($_SESSION['cart']->contents)) {
	reset($_SESSION['cart']->contents);
	while (list($products_id, ) = each($_SESSION['cart']->contents)) {
		$products_list .= ', ' . zen_get_prid(zen_db_input($products_id));
	}
}
$products_list = substr($products_list, 2);