From: Seamus Lee Date: Thu, 2 Sep 2021 00:16:26 +0000 (+0000) Subject: [NFC] Fix E-notice in Afform unit tests X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a003d5f7912dfd81b79b30cf7830abee601546c7;p=civicrm-core.git [NFC] Fix E-notice in Afform unit tests --- diff --git a/ext/afform/core/Civi/Api4/Action/Afform/Get.php b/ext/afform/core/Civi/Api4/Action/Afform/Get.php index 3539d95e72..6a9ae6e681 100644 --- a/ext/afform/core/Civi/Api4/Action/Afform/Get.php +++ b/ext/afform/core/Civi/Api4/Action/Afform/Get.php @@ -56,7 +56,7 @@ class Get extends \Civi\Api4\Generic\BasicGetAction { // Skip if afform does not exist or is not of requested type(s) if ( (!$record && !isset($values[$name])) || - ($getTypes && !in_array($record['type'], $getTypes, TRUE)) + ($getTypes && isset($record['type']) && !in_array($record['type'], $getTypes, TRUE)) ) { continue; }