Skip to content

Commit

Permalink
Merge pull request #2 from jupitern/patch-2
Browse files Browse the repository at this point in the history
fix for php 8.1
  • Loading branch information
TCB13 authored Jan 24, 2023
2 parents 8ad5fb1 + e8ee821 commit e789fcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ public function toObject($className = \stdClass::class, bool $fullObject = false

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

return $unique ? array_unique($arr) : $arr;
}
Expand Down

0 comments on commit e789fcf

Please sign in to comment.