diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-26 23:55:59 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-26 23:55:59 +0200 |
commit | e01db4bfe805f9c9293609089381aaa0cb7afab4 (patch) | |
tree | cbd6078b474ddcc583efe6f24cae112f7e68f344 | |
parent | 1a24a9da3cfbacf8802ffd0b79f5494d30278007 (diff) |
Correct solution to #1533
-rw-r--r-- | system/libraries/Form_validation.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 0d9c65f6f..e7b89d0c4 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 && preg_match('/^[0-9]+$/', $str)); + return ($str != 0 && preg_match('/^[0-9]+$/', $str)); } // -------------------------------------------------------------------- |