summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-03-16 11:16:45 +0100
committerAndrey Andreev <narf@devilix.net>2016-03-16 11:16:45 +0100
commit5576d2ca40666ada969fb2cb951fbddf8ca4ad8e (patch)
treec53d1645c4efaf0c32ba5c880e72899acf5daffb /system
parent2c10f60586faf59b9380608c5a9bf01ff2522483 (diff)
Simplify a bit of internal code in CI_Form_validation
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Form_validation.php20
1 files changed, 2 insertions, 18 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 6be593add..ed4b9bccb 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -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'];
}
}
}