From 55b1c533cf8b82c0bdd1652c9eba0bc153c1bbd1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 21 Aug 2017 08:48:02 +0200 Subject: [PATCH] Fix division by zero. [skip ci] --- app/Repositories/Tag/TagRepository.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 3c9b9728c3..d48d277ea6 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -343,6 +343,9 @@ class TagRepository implements TagRepositoryInterface if ($diff != 0) { $step = $amountDiff / $diff; } + if ($step == 0) { + $step = 1; + } $extra = round($amount / $step);