Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions system/Helpers/number_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ function number_to_size($num, int $precision = 1, ?string $locale = null)
{
// Strip any formatting & ensure numeric input
try {
// @phpstan-ignore-next-line
$num = 0 + str_replace(',', '', $num);
} catch (ErrorException $ee) {
// Catch "Warning: A non-numeric value encountered"
return false;
}

Expand Down