diff options
author | pgee70 <pgee70@users.noreply.github.com> | 2017-10-03 01:09:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-03 01:09:04 +0200 |
commit | cf3924ec3f19fb6a3f4782cfe55e0c6314bcf94d (patch) | |
tree | 0015673281dd02aa73d78450933c229edf655de5 | |
parent | c495515f115685fbcb4180f4305ec2406144ca83 (diff) |
Update DB_query_builder.php
recent changes broke query ordering giving a warning in line 1238 = '$this->qb_cache_orderby = array_merge($this->qb_cache_orderby, $qb_orderby);'
this was because on subsequent re-queries, the qb_cache_orderby was set to NULL not Array() as it is should be (and is instantiated originally .
-rw-r--r-- | system/database/DB_query_builder.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 81603bf31..72bd4e721 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1405,7 +1405,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { // for selecting COUNT(*) ... $qb_orderby = $this->qb_orderby; $qb_cache_orderby = $this->qb_cache_orderby; - $this->qb_orderby = $this->qb_cache_orderby = NULL; + $this->qb_orderby = $this->qb_cache_orderby = array(); $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby) OR $this->qb_limit OR $this->qb_offset) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") |