Skip to content

Commit

Permalink
[5.x] Wrap columns in query builder (#10076)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored May 14, 2024
1 parent d140dd4 commit 4bbd23e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Stache/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Statamic\Data\DataCollection;
use Statamic\Query\Builder as BaseBuilder;
use Statamic\Stache\Stores\Store;
use Statamic\Support\Arr;

abstract class Builder extends BaseBuilder
{
Expand Down Expand Up @@ -41,7 +42,7 @@ public function pluck($column, $key = null)

public function get($columns = ['*'])
{
return $this->onceWithColumns($columns, fn () => $this->withFakeQueryLogging(function () {
return $this->onceWithColumns(Arr::wrap($columns), fn () => $this->withFakeQueryLogging(function () {
$items = $this->getItems($this->resolveKeys());

$items->each(fn ($item) => $item
Expand Down

0 comments on commit 4bbd23e

Please sign in to comment.