Skip to content

Commit

Permalink
Update Select.php
Browse files Browse the repository at this point in the history
Fixed column fetching
  • Loading branch information
butschster committed May 26, 2016
1 parent a55a886 commit 052c077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Element/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ protected function loadOptions()
$options->where($this->getForeignKey(), 0)->orWhereNull($this->getForeignKey());
}

if (! is_null($this->fetchColumns)) {
if (count($this->fetchColumns) > 0) {
$columns = array_merge([$key], $this->fetchColumns);
$options->select($columns);
}
Expand Down

0 comments on commit 052c077

Please sign in to comment.