We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4a60981 + e3a000a commit 4db0808Copy full SHA for 4db0808
laravel/database/query.php
@@ -621,7 +621,7 @@ public function lists($column, $key = null)
621
// set the keys on the array of values using the array_combine
622
// function provided by PHP, which should give us the proper
623
// array form to return from the method.
624
- if ( ! is_null($key))
+ if ( ! is_null($key) && count($results))
625
{
626
return array_combine(array_map(function($row) use ($key)
627
0 commit comments