News:

Looking for documentation? Take a look on our wiki

Main Menu

Bug Report in product detail reviews

Started by karantzak, December 19, 2024, 10:18:06 AM

Previous topic - Next topic

karantzak

Hello,

I am running:
Joomla: 5.2.2
php: 8.1.10
VirtueMart:4.4.0

I faced the error "count(): Argument #1 ($value) must be of type Countable|array, string given" when the user selects a product from the category browse view in order to see the products detail page.
I found out that this is happening when the user has already logged in.

After debugging the application, I found out that the problem exists in the file :
components\com_virtuemart\views\productdetails\tmpl\bs5-default_reviews.php
in line 73 where there is the statement:
<?php if(count($this->rating_reviews) == 0) : ?>
I modified this line as follows:
<?php if(count((array)$this->rating_reviews) == 0) : ?>
and it seems that the problem has been resolved.

Please confirm that this is the right solution.
If yes, please include this fix in the following release