News:

Looking for documentation? Take a look on our wiki

Main Menu

Warning: implode(): Invalid arguments

Started by bboom, December 10, 2014, 19:39:31 PM

Previous topic - Next topic

bboom

Hi,

I found an error in the VirtueMart product model. when I use the function loadProductPrices (in the product model), PHP gives me the following error:

Warning: implode(): Invalid arguments passed in /home/***/administrator/components/com_virtuemart/models/product.php on line 938

The code on that line is:

static $loadedProductPrices = array();
$hash = $productId.','.implode($virtuemart_shoppergroup_ids,'.').','.(int)$front; //md5($q);


I think this is not the correct usage of the implode function. the function requires an array as seccond param.

Jörgen

Hi

You can actually reverse the parameters for implode(). But for consistency the second parameter should be the array. Both usages are anyway allowed.

regards

Jörgen @ Kreativ Fotografi

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

Thank you, params switched now. and directly found some more.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/