mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix division by zero. [skip ci]
This commit is contained in:
parent
9f5c2b74eb
commit
f1a7f30167
@ -340,12 +340,12 @@ class TagRepository implements TagRepositoryInterface
|
||||
$amountDiff = $max - $min;
|
||||
$diff = $range[1] - $range[0];
|
||||
$step = 1;
|
||||
if ($diff !== 0) {
|
||||
if ($diff != 0) {
|
||||
$step = $amountDiff / $diff;
|
||||
}
|
||||
|
||||
$extra = round($amount / $step);
|
||||
|
||||
|
||||
return intval($range[0] + $extra);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user