mirror of
https://github.com/Respect/Validation.git
synced 2024-06-04 14:52:17 +02:00
Fix E_DEPRECATED warning in IntVal rule on PHP 8.1 (#1374)
by @fabacino
This commit is contained in:
parent
4847fe45ff
commit
60566e2250
|
@ -15,6 +15,7 @@ namespace Respect\Validation\Rules;
|
|||
|
||||
use function ctype_digit;
|
||||
use function is_int;
|
||||
use function is_string;
|
||||
|
||||
/**
|
||||
* Validates if the input is an integer.
|
||||
|
@ -36,6 +37,6 @@ final class IntVal extends AbstractRule
|
|||
return true;
|
||||
}
|
||||
|
||||
return ctype_digit($input);
|
||||
return is_string($input) && ctype_digit($input);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue