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

TOPIC: Problem on vm2_cart (php continuously errors)

Problem on vm2_cart (php continuously errors) 9 years 1 month ago #12404

Hi,
i have problem with the plugin. The server administrator just send me a notice (he was seeing it for long time, but didn't pay any attention).
I use the mod_flexible_cart and the vm2_cart provides an error on log file of server (not in joomla root installation)

PHP Warning: Creating default object from empty value in /home/mydomain/public_html/plugins/system/vm2_cart/vm2_cart.php on line 61

the php i'm using is 5.4

Can you help me please?
Last Edit: 9 years 1 month ago by Panos Angel.
The administrator has disabled public write access.

Problem on vm2_cart 9 years 1 month ago #12412

I want to add that i use Virtuemart 2 and joomla 2.5

Thank you
The administrator has disabled public write access.

Problem on vm2_cart 9 years 4 weeks ago #12444

hi,

That is a PHP5.4 related thing -- previously the same situation was considered as PHP Notice and won't be logged, but with PHP5.4+ it is considered as PHP Warning.

The solution is pretty easy though.

Open this PHP file:
plugins/system/vm2_cart/vm2_cart.php

find the 61st line, which is this:
$data->products = array();

and replace it with this:
if (!isset($data)) $data = new stdClass();
$data->products = array();

then the PHP Warning will be gone.

Regards.
Support
The administrator has disabled public write access.
Time to create page: 0.159 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