From: Franky Van Liedekerke Date: Mon, 8 Aug 2016 22:03:18 +0000 (+0200) Subject: printing labels for members with missing address X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0c3f8395bb20fae02bc3837f0cad76d02ec2810c;p=civicrm-core.git printing labels for members with missing address 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. --- diff --git a/CRM/Member/Form/Task/Label.php b/CRM/Member/Form/Task/Label.php index 0ee9e7cf73..9ea8c8645a 100644 --- a/CRM/Member/Form/Task/Label.php +++ b/CRM/Member/Form/Task/Label.php @@ -133,7 +133,8 @@ class CRM_Member_Form_Task_Label extends CRM_Member_Form_Task { '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 {