Fix "floor(): Argument #1 ($num) must be of type int|float, string given" TypeError while running test of Meritoo\Common\Utilities\Miscellaneous::isDecimal()

This commit is contained in:
Meritoo
2022-02-05 16:54:36 +01:00
parent fcaae95810
commit feb8fc293b
2 changed files with 2 additions and 2 deletions

View File

@@ -1 +1 @@
1.1.5
1.1.6

View File

@@ -729,7 +729,7 @@ class Miscellaneous
*/
public static function isDecimal($value)
{
return is_scalar($value) && floor($value) !== (float)$value;
return is_scalar($value) && is_numeric($value)&&floor($value) !== (float)$value;
}
/**