Skip to content

Commit

Permalink
Fixed php 5.4 compatibility issue introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Gwerder committed Feb 8, 2017
1 parent c61b444 commit 08d31f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@ protected function getQualifiedColumnName($column, $table = null)
{
//Check whether there is a matching column expression that contains an
//alias and should therefore not be turned into a qualified column name.
$isAlias = !empty(array_filter($this->query->columns ?: [], function($column) {
$isAlias = count(array_filter($this->query->columns ?: [], function($column) {
return stripos($column, ' as ') !== false;
}));
})) > 0;

if (strpos($column, '.') === false && !$isAlias) {
return $table ?: $this->query->from.'.'.$column;
Expand Down

0 comments on commit 08d31f4

Please sign in to comment.