diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-26 15:25:47 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-26 15:25:47 +0200 |
commit | a779b2cf8ceaea5ecfd8d26f5e2c379b8fca48d8 (patch) | |
tree | 9cd94f7bdbacea676ed8e848361646c6d3942d0b /system/libraries | |
parent | 4b322b18f3398e07275b74f615c2bf727a98a3cd (diff) |
Fix #1624 and clear-up the form validation docs (manually applying #1603)
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Form_validation.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 91f46b6de..c1bf51935 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -957,15 +957,15 @@ class CI_Form_validation { /** * Match one field to another * - * @param string - * @param string field + * @param string $str string to compare against + * @param string $field * @return bool */ public function matches($str, $field) { - $validation_array = empty($this->validation_data) ? $_POST : $this->validation_data; - - return isset($validation_array[$field]) ? ($str === $validation_array[$field]) : FALSE; + return isset($this->_field_data[$field], $this->_field_data[$field]['postdata']) + ? ($str === $this->_field_data[$field]['postdata']) + : FALSE; } // -------------------------------------------------------------------- |