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.
1 parent 1bd157d commit e3a000aCopy full SHA for e3a000a
laravel/database/query.php
@@ -605,7 +605,7 @@ public function lists($column, $key = null)
605
// set the keys on the array of values using the array_combine
606
// function provided by PHP, which should give us the proper
607
// array form to return from the method.
608
- if ( ! is_null($key))
+ if ( ! is_null($key) && count($results))
609
{
610
return array_combine(array_map(function($row) use ($key)
611
0 commit comments