Skip to content

Commit

Permalink
Fixing code for PHP 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 13, 2014
1 parent 973ad3d commit c13a2a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Association/BelongsToMany.php
Expand Up @@ -893,7 +893,7 @@ protected function _buildQuery($options) {
$assoc = $this->target()->association($name);
$query
->join($matching + $joins, [], true)
->autoFields(empty($query->clause('select')))
->autoFields($query->clause('select') === [])
->select($query->aliasFields((array)$assoc->foreignKey(), $name));

$query->eagerLoader()->addToJoinsMap($name, $assoc);
Expand Down

0 comments on commit c13a2a3

Please sign in to comment.