From ccd96a98eff41b15f9c675d5f9990af3da7a67d5 Mon Sep 17 00:00:00 2001 From: vChabot Date: Thu, 14 Jun 2012 09:24:28 +0000 Subject: [PATCH] [-] MO : BugFix : #PSCFV-2821 : ProductComment module does not save grade with only one criterion --- modules/productcomments/controllers/front/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/productcomments/controllers/front/default.php b/modules/productcomments/controllers/front/default.php index a62a0eb26..064426ada 100644 --- a/modules/productcomments/controllers/front/default.php +++ b/modules/productcomments/controllers/front/default.php @@ -118,7 +118,7 @@ class ProductCommentsDefaultModuleFrontController extends ModuleFrontController $product_comment_criterion->addGrade($comment->id, $grade); } - if (count(Tools::getValue('criterion')) > 1) + if (count(Tools::getValue('criterion')) >= 1) { $comment->grade = $grade_sum / count(Tools::getValue('criterion')); // Update Grade average of comment