summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-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 b99d4c607..645ac3969 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -965,7 +965,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
}
elseif ($direction !== $this->_random_keyword && $escape === TRUE)
{
- $part = preg_match('/^(.+)\s+(ASC|DESC)$/i', $orderby, $matches)
+ $orderby = preg_match('/^(.+)\s+(ASC|DESC)$/i', $orderby, $matches)
? $this->protect_identifiers(rtrim($matches[1])).' '.$matches[2]
: $this->protect_identifiers($orderby);
}