fix array element access on null
authordemeritcowboy <demeritcowboy@hotmail.com>
Wed, 5 Jan 2022 00:33:42 +0000 (19:33 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Wed, 5 Jan 2022 00:33:42 +0000 (19:33 -0500)
CRM/Member/Form/MembershipBlock.php

index 352ad1d0c4e08847abf080a535af4027659622b4..2148be9f6e0f0b1071778a8869258b4f5f89cfa3 100644 (file)
@@ -37,7 +37,7 @@ class CRM_Member_Form_MembershipBlock extends CRM_Contribute_Form_ContributionPa
     if (isset($this->_id)) {
       $defaults = CRM_Member_BAO_Membership::getMembershipBlock($this->_id);
     }
-    $defaults['member_is_active'] = $defaults['is_active'];
+    $defaults['member_is_active'] = $defaults['is_active'] ?? FALSE;
 
     // Set Display Minimum Fee default to true if we are adding a new membership block
     if (!isset($defaults['id'])) {