If trying to print address labels for a group of members (via the Search menu), if there's 1 member without address no PDF is generated.
The $rows variable only contains entries for members that actually have an address, so we need to check that.
'return' => 'contact_id',
));
foreach ($memberships['values'] as $id => $membership) {
- $labelRows[$id] = $rows[$membership['contact_id']];
+ if (isset($rows[$membership['contact_id']]))
+ $labelRows[$id] = $rows[$membership['contact_id']];
}
}
else {