From 1efac43a74100a1a22bc566f2dc4997b7304eea5 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Sun, 25 Jun 2017 09:58:03 +0300 Subject: [PATCH] Egn class: A minor correction. Signed-off-by:Ivan Tcholakov --- Egn.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Egn.php b/Egn.php index 7719d49..de43bf2 100644 --- a/Egn.php +++ b/Egn.php @@ -137,6 +137,12 @@ public static function valid($egn) { $egn = (string) $egn; + // Added by Ivan Tcholakov, 25-JUN-2017. + if (!ctype_digit($egn)) { + return false; + } + // + if (strlen($egn) != 10) { return false; }