From e566443dcea2e98822919d06d858ee494cc883e3 Mon Sep 17 00:00:00 2001 From: olayiwola-compucorp <85277674+olayiwola-compucorp@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:11:27 +0100 Subject: [PATCH] COMCL-842: Fix issue with editing direct debit mandate --- CRM/ManualDirectDebit/Hook/BuildForm/CustomData.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/ManualDirectDebit/Hook/BuildForm/CustomData.php b/CRM/ManualDirectDebit/Hook/BuildForm/CustomData.php index 9080f9a..49b5291 100644 --- a/CRM/ManualDirectDebit/Hook/BuildForm/CustomData.php +++ b/CRM/ManualDirectDebit/Hook/BuildForm/CustomData.php @@ -58,7 +58,8 @@ public function run() { private function checkIfDirectDebitMandateInGroupTree() { $customGroupTree = $this->form->getVar('_groupTree'); - return array_key_exists($this->directDebitMandateId, $customGroupTree); + + return !empty($customGroupTree) && array_key_exists($this->directDebitMandateId, $customGroupTree); } /**