From 0c3f8395bb20fae02bc3837f0cad76d02ec2810c Mon Sep 17 00:00:00 2001 From: Franky Van Liedekerke Date: Tue, 9 Aug 2016 00:03:18 +0200 Subject: [PATCH] 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. --- CRM/Member/Form/Task/Label.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.25.1