summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorMichiel Vugteveen <michiel@it-can.nl>2012-06-14 23:26:34 +0200
committerMichiel Vugteveen <michiel@it-can.nl>2012-06-14 23:26:34 +0200
commita8221ade975111eb55da06b553789ad541bf2bff (patch)
tree5767c557857ce4854f2e543b88d0877b74c3b6cb /system/libraries/Form_validation.php
parenteccde13b8ae8be69645cf1abedcdbdc3c278b615 (diff)
fix
Diffstat (limited to 'system/libraries/Form_validation.php')
-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));
}
// --------------------------------------------------------------------