From b19c857cc31e1e4404a36f13ebe4398a81bae364 Mon Sep 17 00:00:00 2001 From: vasilevdm Date: Wed, 2 Sep 2020 14:37:16 +0300 Subject: [PATCH] fix error during installation when orders count equals zero (#130) --- intaro.retailcrm/install/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index 0565be7a..529a69ae 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -591,7 +591,12 @@ class intaro_retailcrm extends CModule } else { $finish = (int)$_POST['finish']; } - $percent = round(100 - ($countLeft * 100 / $countAll), 1); + + if (!$countAll) { + $percent = 100; + } else { + $percent = round(100 - ($countLeft * 100 / $countAll), 1); + } if (!$countLeft) { $finish = 1;