summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/codeigniter/Compat.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/system/codeigniter/Compat.php b/system/codeigniter/Compat.php
index 3c5f70d60..108b0a1aa 100644
--- a/system/codeigniter/Compat.php
+++ b/system/codeigniter/Compat.php
@@ -55,6 +55,11 @@ if (! function_exists('ctype_digit'))
{
function ctype_digit($str)
{
+ if (! is_string($str) OR $str == '')
+ {
+ return FALSE;
+ }
+
return ! preg_match('/[^0-9]/', $str);
}
}
@@ -75,6 +80,11 @@ if (! function_exists('ctype_alnum'))
{
function ctype_alnum($str)
{
+ if (! is_string($str) OR $str == '')
+ {
+ return FALSE;
+ }
+
return ! preg_match('/[^0-9a-z]/i', $str);
}
}