From 6673974a803eafc2e4759b023cefa2a80dece23a Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 11 May 2017 14:46:11 +0000 Subject: [PATCH] verify: integer can be integer git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3645 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- verify.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/verify.php b/verify.php index 10d3039..7e48fff 100644 --- a/verify.php +++ b/verify.php @@ -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;