From 1aebf5b0e361db2fe491ff53b67b96ca248ac403 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 18 Dec 2019 20:56:49 -0800 Subject: [PATCH] Afform.get - Fix warning/test-failure when trying to load non-existent record --- ext/afform/core/Civi/Api4/Action/Afform/Get.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/afform/core/Civi/Api4/Action/Afform/Get.php b/ext/afform/core/Civi/Api4/Action/Afform/Get.php index 13288cc739..0f16028e97 100644 --- a/ext/afform/core/Civi/Api4/Action/Afform/Get.php +++ b/ext/afform/core/Civi/Api4/Action/Afform/Get.php @@ -19,7 +19,9 @@ class Get extends \Civi\Api4\Generic\BasicGetAction { $values = []; foreach ($names as $name) { $record = $scanner->getMeta($name); - $record = array_merge($record, $scanner->getComputedFields($name)); + if ($record) { + $record = array_merge($record, $scanner->getComputedFields($name)); + } $layout = $this->_isFieldSelected('layout') ? $scanner->getLayout($name) : NULL; if ($layout !== NULL) { // FIXME check for validity? -- 2.25.1