Skip to content

Commit 6cb896d

Browse files
committed
Fix SizeTrait - is_float should be is_numeric to recognize the numeric string as number
1 parent fc896bd commit 6cb896d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rules/Traits/SizeTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait SizeTrait
1515
*/
1616
protected function getValueSize($value)
1717
{
18-
if (is_int($value) || is_float($value)) {
18+
if (is_int($value) || is_numeric($value)) {
1919
return (float) $value;
2020
} elseif (is_string($value)) {
2121
return (float) mb_strlen($value, 'UTF-8');

0 commit comments

Comments
 (0)