diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-10 00:03:49 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-10 00:03:49 +0200 |
commit | 77cc0281479b9ccecc9f7bc1386846a1ccf5f94f (patch) | |
tree | b1b6dd60f5be6cf0ffe0212e890f97ed0f22c2a1 /system/database/DB_active_rec.php | |
parent | 7988beaab1f68c84f8d444aa037f621e107fd7e0 (diff) |
Fixed a bug where using this->db->select_max(), this->db->select_min(), etc could throw notices. Thanks to w43l for the patch.
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r-- | system/database/DB_active_rec.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 0a25b3cb5..2af3553ed 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1694,7 +1694,8 @@ class CI_DB_active_record extends CI_DB_driver { // is because until the user calls the from() function we don't know if there are aliases foreach ($this->ar_select as $key => $val) { - $this->ar_select[$key] = $this->_protect_identifiers($val, FALSE, $this->ar_no_escape[$key]); + $no_escape = isset($this->ar_no_escape[$key]) ? $this->ar_no_escape[$key] : NULL; + $this->ar_select[$key] = $this->_protect_identifiers($val, FALSE, $no_escape); } $sql .= implode(', ', $this->ar_select); |