verify: integer can be integer

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3645 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-11 14:46:11 +00:00
parent ed547df3eb
commit 6673974a80

View File

@@ -237,7 +237,9 @@ class verify
*/
public static function staticIs_integer ($val)
{
if (! is_string ($val) || trim ($val) === "" || ! is_int ($val))
if (! is_string ($val) && ! is_int ($val))
return false;
if (trim ($val) === "")
return false;
if (strspn ($val, "0123456789") !== strlen ($val))
return false;