summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-26 23:55:59 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-26 23:55:59 +0200
commite01db4bfe805f9c9293609089381aaa0cb7afab4 (patch)
treecbd6078b474ddcc583efe6f24cae112f7e68f344 /system/libraries
parent1a24a9da3cfbacf8802ffd0b79f5494d30278007 (diff)
Correct solution to #1533
Diffstat (limited to 'system/libraries')
-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 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));
}
// --------------------------------------------------------------------