summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_query_builder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 54fb50f6a..936d114bd 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -2148,7 +2148,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
{
if ($this->qb_orderby[$i]['escape'] !== FALSE)
{
- $this->qb_orderby[$i]['field'] = $this->protect_identifiers($field);
+ $this->qb_orderby[$i]['field'] = $this->protect_identifiers($this->qb_orderby[$i]['field']);
}
$this->qb_orderby[$i] = $this->qb_orderby[$i]['field'].$this->qb_orderby[$i]['direction'];