diff options
author | Andrey Andreev <narf@devilix.net> | 2015-07-21 13:04:54 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-07-21 13:04:54 +0200 |
commit | e1a94d30e2f30cee36f71c246136fb2db34d25df (patch) | |
tree | bf2a1c668759ea5225176f9c2ce6796560873e57 /system/database | |
parent | d3ac964d356eea78c5a4d894915caf084e54ce18 (diff) |
Fix #3989
More instances of the bug that was fixed with 43afc71b777b00cfc2638add6fa3c47d333c5e04
Diffstat (limited to 'system/database')
-rw-r--r-- | system/database/DB_query_builder.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index fc2d5901e..e53fb5478 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1276,8 +1276,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { foreach ($key as $k => $v) { - $this->qb_set[$this->protect_identifiers($k, FALSE, $escape)] = ($escape) - ? $this->escape($v) : $v; + $this->qb_set[$this->protect_identifiers($k, FALSE, $escape)] = $this->escape($v); } return $this; @@ -1516,15 +1515,9 @@ abstract class CI_DB_query_builder extends CI_DB_driver { ksort($row); // puts $row in the same order as our keys - if ($escape !== FALSE) + foreach ($row as $k => $v) { - $clean = array(); - foreach ($row as $value) - { - $clean[] = $this->escape($value); - } - - $row = $clean; + $row[$k] = $this->escape($v); } $this->qb_set[] = '('.implode(',', $row).')'; @@ -1945,7 +1938,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $index_set = TRUE; } - $clean[$this->protect_identifiers($k2, FALSE, $escape)] = ($escape === FALSE) ? $v2 : $this->escape($v2); + $clean[$this->protect_identifiers($k2, FALSE, $escape)] = $this->escape($v2); } if ($index_set === FALSE) |