diff options
author | Michiel Vugteveen <michiel@it-can.nl> | 2012-06-14 23:26:34 +0200 |
---|---|---|
committer | Michiel Vugteveen <michiel@it-can.nl> | 2012-06-14 23:26:34 +0200 |
commit | a8221ade975111eb55da06b553789ad541bf2bff (patch) | |
tree | 5767c557857ce4854f2e543b88d0877b74c3b6cb | |
parent | eccde13b8ae8be69645cf1abedcdbdc3c278b615 (diff) |
fix
-rw-r--r-- | system/libraries/Form_validation.php | 10 |
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)); } // -------------------------------------------------------------------- |