diff options
author | Andrey Andreev <narf@devilix.net> | 2016-03-21 17:32:19 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-03-21 17:32:19 +0100 |
commit | b4d719dc7fb3b010b53c09e7e82f979abf731ff9 (patch) | |
tree | 34e3d8213830f8d6362fbb868718806ad100dceb /system/libraries/Form_validation.php | |
parent | 99e8dc396f6f79980623daaf9265f4933b897ff6 (diff) | |
parent | eb373a1abb348515001123ecbaca5e5384e69d19 (diff) |
Merge branch '3.0-stable' into develop
Resolved conflicts:
user_guide_src/source/changelog.rst
user_guide_src/source/conf.py
user_guide_src/source/installation/downloads.rst
user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 9fb686892..e4a518957 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -486,7 +486,7 @@ class CI_Form_validation { } // Now we need to re-set the POST data with the new, processed data - $this->_reset_post_array(); + empty($this->validation_data) && $this->_reset_post_array(); return ($total_errors === 0); } @@ -527,10 +527,7 @@ class CI_Form_validation { { if ($row['is_array'] === FALSE) { - if (isset($_POST[$row['field']])) - { - $_POST[$row['field']] = $row['postdata']; - } + isset($_POST[$field]) && $_POST[$field] = $row['postdata']; } else { @@ -550,20 +547,7 @@ class CI_Form_validation { } } - if (is_array($row['postdata'])) - { - $array = array(); - foreach ($row['postdata'] as $k => $v) - { - $array[$k] = $v; - } - - $post_ref = $array; - } - else - { - $post_ref = $row['postdata']; - } + $post_ref = $row['postdata']; } } } @@ -1515,10 +1499,11 @@ class CI_Form_validation { * This function allows HTML to be safely shown in a form. * Special characters are converted. * - * @param string - * @return string + * @deprecated 3.0.6 Not used anywhere within the framework and pretty much useless + * @param mixed $data Input data + * @return mixed */ - public function prep_for_form($data = '') + public function prep_for_form($data) { if ($this->_safe_form_data === FALSE OR empty($data)) { |