Commit e3a000af authored by Kelly Banman's avatar Kelly Banman

Fix Query::lists() for empty resultsets

parent 1bd157d0
...@@ -605,7 +605,7 @@ class Query { ...@@ -605,7 +605,7 @@ class Query {
// set the keys on the array of values using the array_combine // set the keys on the array of values using the array_combine
// function provided by PHP, which should give us the proper // function provided by PHP, which should give us the proper
// array form to return from the method. // array form to return from the method.
if ( ! is_null($key)) if ( ! is_null($key) && count($results))
{ {
return array_combine(array_map(function($row) use ($key) return array_combine(array_map(function($row) use ($key)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment