Skip to content

Commit

Permalink
refactor: revert unneeded workaround from #5361
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Mar 6, 2022
1 parent 30bc414 commit 7509003
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,7 @@ public function protectIdentifiers($item, bool $prefixSingle = false, ?bool $pro
//
// NOTE: The ! empty() condition prevents this method
// from breaking when QB isn't enabled.
$firstSegment = trim($parts[0], $this->escapeChar);
if (! empty($this->aliasedTables) && in_array($firstSegment, $this->aliasedTables, true)) {
if (! empty($this->aliasedTables) && in_array($parts[0], $this->aliasedTables, true)) {
if ($protectIdentifiers === true) {
foreach ($parts as $key => $val) {
if (! in_array($val, $this->reservedIdentifiers, true)) {
Expand Down

0 comments on commit 7509003

Please sign in to comment.