From 3d9cec94b7cfd621111cb31808b23a1b6eaccf65 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 8 Jul 2012 21:50:19 +0300 Subject: #1558 --- system/libraries/Form_validation.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'system/libraries') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 353624100..b490a34ca 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -460,6 +460,12 @@ class CI_Form_validation { $this->_field_data[$field]['postdata'] = $validation_array[$field]; } + // Don't try to validate if we have no rules set + if (empty($row['rules'])) + { + continue; + } + $this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']); } -- cgit v1.2.3-24-g4f1b