Skip to content

Instantly share code, notes, and snippets.

@jonnu
Created July 6, 2012 12:24
Show Gist options
  • Save jonnu/3059876 to your computer and use it in GitHub Desktop.
Save jonnu/3059876 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..fe0dc93 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -460,7 +460,7 @@ class CI_Form_validation {
$this->_field_data[$field]['postdata'] = $validation_array[$field];
}
- $this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);
+ $this->_execute($row, preg_split('/\|/', $row['rules'], -1, PREG_SPLIT_NO_EMPTY), $this->_field_data[$field]['postdata']);
}
// Did we end up with any errors?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment