diff options
author | tiyowan <tiyowan@gmail.com> | 2012-03-12 17:26:59 +0100 |
---|---|---|
committer | tiyowan <tiyowan@gmail.com> | 2012-03-12 17:31:34 +0100 |
commit | 5b9fd2deb29968fd5f7b039868d95ce9c1392de5 (patch) | |
tree | 74abf4be5d62a3ebde37173b9a5c89703d398a7f /system/libraries/Form_validation.php | |
parent | 6da86c89f8b0ecb8bee11e6fa777dac7f6052236 (diff) |
Replace function_exists() checks with MB_ENABLED constant
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 826d94fb0..9491f354c 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -72,7 +72,7 @@ class CI_Form_validation { $this->CI->load->helper('form'); // Set the character encoding in MB. - if (function_exists('mb_internal_encoding')) + if (MB_ENABLED === TRUE) { mb_internal_encoding($this->CI->config->item('charset')); } @@ -950,7 +950,7 @@ class CI_Form_validation { return FALSE; } - if (function_exists('mb_strlen')) + if (MB_ENABLED === TRUE) { return ! (mb_strlen($str) < $val); } @@ -974,7 +974,7 @@ class CI_Form_validation { return FALSE; } - if (function_exists('mb_strlen')) + if (MB_ENABLED === TRUE) { return ! (mb_strlen($str) > $val); } @@ -998,7 +998,7 @@ class CI_Form_validation { return FALSE; } - if (function_exists('mb_strlen')) + if (MB_ENABLED === TRUE) { return (mb_strlen($str) == $val); } |