summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-12 20:55:07 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-12 20:55:07 +0100
commit93dfe4123af679a4cf475f5e38e20dda0cbe9e75 (patch)
tree09e79cc0987d752d1f08256853411251f437ca95 /system/libraries/Form_validation.php
parent09aefde6a7260cbc694f2d23d0842e7a5089ad67 (diff)
parent4efd1cf37fb5518ae81369f9066cea9b7246caee (diff)
Merge pull request #1174 from tiyowan/remove-defines
Use the MB_ENABLED constant for mb checks instead of multiple function_exists()
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php8
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);
}