summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Form_validation.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 069751b45..37eb7a9cd 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -993,7 +993,7 @@ class CI_Form_validation {
* Minimum Length
*
* @param string
- * @param int
+ * @param string
* @return bool
*/
public function min_length($str, $val)
@@ -1014,7 +1014,7 @@ class CI_Form_validation {
* Max Length
*
* @param string
- * @param int
+ * @param string
* @return bool
*/
public function max_length($str, $val)
@@ -1045,11 +1045,9 @@ class CI_Form_validation {
return FALSE;
}
- $val = (int) $val;
-
return (MB_ENABLED === TRUE)
- ? (mb_strlen($str) === $val)
- : (strlen($str) === $val);
+ ? (mb_strlen($str) === intval($val))
+ : (strlen($str) === intval($val));
}
// --------------------------------------------------------------------