From: Tim Otten Date: Thu, 19 Dec 2019 04:56:49 +0000 (-0800) Subject: Afform.get - Fix warning/test-failure when trying to load non-existent record X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1aebf5b0e361db2fe491ff53b67b96ca248ac403;p=civicrm-core.git Afform.get - Fix warning/test-failure when trying to load non-existent record --- 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?