Skip to content

Commit 683385f

Browse files
authored
fix newQueryWithoutScopes()
fix newQueryWithoutScopes() to work in backpack 5.5 and Laravel 9
1 parent 5a7445b commit 683385f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/Library/CrudPanel/Traits/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private function getCountFromQuery(Builder $query)
246246
// so we just store them and re-use them in the sub-query too.
247247
$expressionColumns = [];
248248

249-
foreach ($crudQuery->columns as $column) {
249+
foreach ($crudQuery->columns ?? [] as $column) {
250250
if (! is_string($column) && is_a($column, 'Illuminate\Database\Query\Expression')) {
251251
$expressionColumns[] = $column;
252252
}

0 commit comments

Comments
 (0)