summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-26 10:13:53 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-26 10:13:53 +0200
commit290f0046df6a1cf0e6f48f5b7f0043278475bea8 (patch)
tree38c48efdf6ef1674e9444157de6484e01793f197
parent40f1404344d09520e91d6d3cb9ccd23b786ca35e (diff)
Fix issue #1533
-rw-r--r--system/libraries/Form_validation.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 4bb29e41b..484e306b9 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1277,7 +1277,7 @@ class CI_Form_validation {
*/
public function is_natural_no_zero($str)
{
- return ($str !== 0 && preg_match('/^[0-9]+$/', $str));
+ return ($str && preg_match('/^[0-9]+$/', $str));
}
// --------------------------------------------------------------------