diff options
author | Andrey Andreev <narf@devilix.net> | 2015-08-13 12:23:56 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-08-13 12:23:56 +0200 |
commit | a7a542610aeaff52444496303565b179a9dd25b2 (patch) | |
tree | 121b6f4c9b0418fb9034dc19d465f207bbcdabf3 /system/database/DB_driver.php | |
parent | 999d7f7861ad6430d515514ce71fa44bd6b77a46 (diff) | |
parent | 0d60a21187e2611cc4cf0ef2d7322c9b91c002b9 (diff) |
Merge branch '3.0-stable' into develop
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 659664db9..34d3a5979 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1788,12 +1788,15 @@ abstract class CI_DB_driver { // with an alias. While we're at it, we will escape the components if (strpos($item, '.') !== FALSE) { - $parts = explode('.', $item); + $parts = explode('.', $item); // Does the first segment of the exploded item match // one of the aliases previously identified? If so, // we have nothing more to do other than escape the item - if (in_array($parts[0], $this->qb_aliased_tables)) + // + // NOTE: The ! empty() condition prevents this method + // from breaking when QB isn't enabled. + if ( ! empty($this->qb_aliased_tables) && in_array($parts[0], $this->qb_aliased_tables)) { if ($protect_identifiers === TRUE) { |