ZF2-522: db query with experssion that returns an empty results, return one row with all columns eq to null


since zf2 b7 I am able to use expressions inside a db query (in my case for group_Concat).

whenever the query returns an empty result set, instead of getting an empty one i get a result of one row when all of it's column's value are null. if I remove the expression from the query this behavior does not happen.

I paste my code to :

the bug can be easily overcome for now by checking if only one row returned and to check if a column that not supposed to get null value is null.

in my case: if ($resultSet->count()>0) { $rows=$resultSet->toArray(); if (count($rows) > 1 || $rows[0]['liquid_color_type_name'] != null ) { //overcome zf bug $result=json_encode($rows[0]); } }



This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: