Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Dropdown Shopping Cart(SKU# FLEX-00001)

TOPIC: default object

default object 10 years 6 months ago #6286

I bought the extension yesterday, until now everything is working well, but I wonder how to fix this little problem: Warning: Creating default object from empty value in C:\xampp\htdocs\template\plugins\system\vm2_cart\vm2_cart.php on line 61

tnks
The administrator has disabled public write access.

default object 10 years 6 months ago #6303

Hi,

That's an innocent warning that shows off only in localhost for development purposes.
Live servers ignore this error message.

If that message bothers you. To ignore that warning; you can include this PHP line:
error_reporting(E_ERROR);

To the top of this PHP file:
ROOT//plugins/system/vm2_cart/vm2_cart.php

Regards.
Support & Development
The administrator has disabled public write access.

default object 10 years 6 months ago #6307

thanks, i will try latter online!
The administrator has disabled public write access.

default object 10 years 6 months ago #6313

Sure.
But you can relieve, that's not a big deal at all. You should get used to seeing that kind of things while you are working on localhost.
The administrator has disabled public write access.

default object 10 years 2 months ago #8033

Hello,

I got the same error message.

As I do not like having errors ...
I think you have solved the problem

in \plugins\system\vm2_cart\vm2_cart.php
  adding: if(!isset($data)){$data= new stdClass();}
//of course, some may argue that the $this->data->products should be generated in the view.html.php, but
		//
		if(!isset($data)){$data= new stdClass();}
		$data->products = array();
		$data->totalProduct = 0;
		$i=0;
By the solution of
stackoverflow.com/questions/8900701/creating-default-object-from-empty-value-in-php

If this help someone, can you tell if it's ok?

Regards,
philippet
The administrator has disabled public write access.

default object 10 years 2 months ago #8055

Hi,

Of course solving the problem itself is always better than hiding the error message.
I am sure this patch will eliminate the warning message.

Regards.
Support.
The administrator has disabled public write access.
Time to create page: 0.119 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo