summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Form_validation.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6cbe032c7..069751b45 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1035,7 +1035,7 @@ class CI_Form_validation {
* Exact Length
*
* @param string
- * @param int
+ * @param string
* @return bool
*/
public function exact_length($str, $val)
@@ -1045,6 +1045,8 @@ class CI_Form_validation {
return FALSE;
}
+ $val = (int) $val;
+
return (MB_ENABLED === TRUE)
? (mb_strlen($str) === $val)
: (strlen($str) === $val);