commit | 290f0046df6a1cf0e6f48f5b7f0043278475bea8 | [log] [tgz] |
---|---|---|
author | Andrey Andreev <narf@bofh.bg> | Tue Jun 26 11:13:53 2012 +0300 |
committer | Andrey Andreev <narf@bofh.bg> | Tue Jun 26 11:13:53 2012 +0300 |
tree | 38c48efdf6ef1674e9444157de6484e01793f197 | |
parent | 40f1404344d09520e91d6d3cb9ccd23b786ca35e [diff] |
Fix issue #1533
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 4bb29e4..484e306 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php
@@ -1277,7 +1277,7 @@ */ public function is_natural_no_zero($str) { - return ($str !== 0 && preg_match('/^[0-9]+$/', $str)); + return ($str && preg_match('/^[0-9]+$/', $str)); } // --------------------------------------------------------------------