VirtueMart Forum

VirtueMart 2 + 3 => 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
Code: [Select]
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 :-)