VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: eric_v on September 26, 2018, 18:50:47 PM

Title: error when creating product review
Post by: eric_v on September 26, 2018, 18:50:47 PM
Hi,

I'm using VM 3.4.0 and Joomla 3.8.12 and T3 template.

I'm getting this error when creating a product review:

Fatal error: Cannot use object of type stdClass as array in E:\Apache24\htdocs\www\www.APApneu.ca\v4\components\com_virtuemart\helpers\shopfunctionsf.php on line 641

The review is created, but the user is stuck with the error message.

Thank you!

Eric
Title: Re: error when creating product review
Post by: StefanSTS on September 27, 2018, 13:30:49 PM
Hello,

which PHP version are you using?

Title: Re: error when creating product review
Post by: eric_v on September 27, 2018, 14:42:18 PM

PHP Version 5.6.35
Title: Re: error when creating product review
Post by: Milbo on September 27, 2018, 20:53:04 PM
the new core will have

if(is_object($view->user)){
$replyTo[0] = isset($view->user->email)? $view->user->email:false;
$replyToName[0] = isset($view->user->name)? $view->user->name:false;
} else {
$replyTo[0] = isset($view->user['email'])? $view->user['email']:false;
$replyToName[0] = isset($view->user['name'])? $view->user['name']:false;
}


it would be good, when you directly test it.
Title: Re: error when creating product review
Post by: eric_v on September 28, 2018, 00:38:51 AM
Thank you! that did it! :)
Title: Re: error when creating product review
Post by: Milbo on September 28, 2018, 10:30:54 AM
nice, so we  can set a check on that :-)