From 7c24c50d9b588e6cabbc583ecf8669b8daff7b2e 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16016 b9a71923-0436-4b27-9f14-aed3839534dd --- 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