Skip to content

Commit e789fcf

Browse files
authored
Merge pull request #2 from jupitern/patch-2
fix for php 8.1
2 parents 8ad5fb1 + e8ee821 commit e789fcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ public function toObject($className = \stdClass::class, bool $fullObject = false
635635

636636
public function toUnidimensionalArray(string $key, bool $unique = false)
637637
{
638-
$arr = array_column($this->toArray(), $key);
638+
$arr = array_column($this->toArray() ?? [], $key);
639639

640640
return $unique ? array_unique($arr) : $arr;
641641
}

0 commit comments

Comments
 (0)