Hi,
I'm a developer of ARTIO VM Invoice 3 component. Our clients started to have problems with some functionality after updating VirtueMart to 3.8.6.10373 and 3.8.7.10378 with the following error message:
"Call to a member function set() on null: .../components/com_virtuemart/helpers/cart.php:263"
I've checked the code in that file and it seems that on the mentioned line number 263 there is the following code in function getCart():
$session->set('vmcartlastVendorId', $vendorId, 'vm');
But the $session variable might not be defined - if we pass some data to $cartData argument of the getCart() function, the $session variable will not be initialized. Could you please check this?
Thank you.
The new version has at line 117
$session = JFactory::getSession($options);
That should fix it, or?
Which new version do you mean? I've just checked 3.8.7.10378 and there's the following code:
$multixcart = VmConfig::get('multixcart',0);
if(empty($multixcart)){
$vendorId = 1;
//vmdebug('No Multicart vendorId = 1');
} else {
if($vendorId === NULL){
$session = JFactory::getSession($options);
So the $session gets initialized there only when multi-vendor cart handling is enabled.
I guess Max means to add this at the start of the function
is already fixed in 3.8.7.10380 - soon to be 3.8.8
Great, thanks, will tell our customers it will be fixed in 3.8.8.
Have a nice day