Skip to content

Commit

Permalink
Only check if the value is numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk committed Jan 25, 2025
1 parent 648663a commit 5c43aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public static function numeric(mixed $value, ?int $precision = null, bool $stric
{
$number = strtr(static::stringify($value), [' ' => '', ',' => '.']);

if (!$number || !is_numeric($number)) {
if (!is_numeric($number)) {
return $strict ? null : $value;
}

Expand Down

0 comments on commit 5c43aea

Please sign in to comment.