Skip to content

Commit f3a29bf

Browse files
authored
[Bug] Added default download and upload value when assessing if a threshold was breached (alexjustesen#1218)
1 parent 49aa8bf commit f3a29bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ function percentChange(float $dividend, float $divisor, int $precision = 0): str
3434
}
3535

3636
if (! function_exists('absoluteDownloadThresholdFailed')) {
37-
function absoluteDownloadThresholdFailed(float $threshold, float $download): bool
37+
function absoluteDownloadThresholdFailed(float $threshold, float $download = 0): bool
3838
{
3939
return toBits(convertSize($download), 2) < $threshold;
4040
}
4141
}
4242

4343
if (! function_exists('absoluteUploadThresholdFailed')) {
44-
function absoluteUploadThresholdFailed(float $threshold, float $upload): bool
44+
function absoluteUploadThresholdFailed(float $threshold, float $upload = 0): bool
4545
{
4646
return toBits(convertSize($upload), 2) < $threshold;
4747
}

0 commit comments

Comments
 (0)