Skip to content

Instantly share code, notes, and snippets.

@jonnu
Created July 6, 2012 14:14
Show Gist options
  • Save jonnu/3060407 to your computer and use it in GitHub Desktop.
Save jonnu/3060407 to your computer and use it in GitHub Desktop.
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 3536241..3a9249f 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -460,6 +460,11 @@ class CI_Form_validation {
$this->_field_data[$field]['postdata'] = $validation_array[$field];
}
+ if (empty($row['rules']))
+ {
+ continue;
+ }
+
$this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment