$details = $query->searchQuery(0, 0, NULL, FALSE, FALSE,
FALSE, FALSE, FALSE, $additionalWhereClause);
- if (!$details->fetch()) {
- return;
+ while ($details->fetch()) {
+ if (!$details) {
+ return;
+ }
}
$query->convertToPseudoNames($details);
$config = CRM_Core_Config::singleton();