summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-03-09 18:14:04 +0100
committerAndrey Andreev <narf@devilix.net>2015-03-09 18:14:04 +0100
commitafc20169146e4a6431f5aba9c980072964807721 (patch)
tree974d3b128ca38ed60b80a18f8fa10a73085fbe72
parente7a3096b9cbd7c95bf4240c5233c7d14eb112305 (diff)
parent8d6c8fecce7f1cb4bcd7a196ec77748d5e33e689 (diff)
Merge pull request #3653 from bjjay/bjjay-patch
Reduce once MB_ENABLED checking
-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);
}
// --------------------------------------------------------------------