summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorbjjay <fris@vip.qq.com>2015-03-09 06:46:06 +0100
committerbjjay <fris@vip.qq.com>2015-03-09 06:46:06 +0100
commit8d6c8fecce7f1cb4bcd7a196ec77748d5e33e689 (patch)
tree974d3b128ca38ed60b80a18f8fa10a73085fbe72 /system/libraries
parente7a3096b9cbd7c95bf4240c5233c7d14eb112305 (diff)
Reduce once MB_ENABLED checking
The checking is done in the compat file system/core/compat/mbstring.php
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index f161b40e7..9d1660258 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1151,9 +1151,7 @@ class CI_Form_validation {
return FALSE;
}
- return (MB_ENABLED === TRUE)
- ? ($val <= mb_strlen($str))
- : ($val <= strlen($str));
+ return ($val <= mb_strlen($str));
}
// --------------------------------------------------------------------
@@ -1172,9 +1170,7 @@ class CI_Form_validation {
return FALSE;
}
- return (MB_ENABLED === TRUE)
- ? ($val >= mb_strlen($str))
- : ($val >= strlen($str));
+ return ($val >= mb_strlen($str));
}
// --------------------------------------------------------------------
@@ -1193,9 +1189,7 @@ class CI_Form_validation {
return FALSE;
}
- return (MB_ENABLED === TRUE)
- ? (mb_strlen($str) === (int) $val)
- : (strlen($str) === (int) $val);
+ return (mb_strlen($str) === (int) $val);
}
// --------------------------------------------------------------------