From 97869e7147f8c75d7b8c861930dae8e78e985ac4 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Thu, 21 Oct 2021 12:18:26 +0200 Subject: [PATCH] Prevent Undefined Index PHP notices with Afform entity metadata without an icon --- ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php b/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php index 93d700d624..bd72efb865 100644 --- a/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php +++ b/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php @@ -85,7 +85,7 @@ class AfformAdminMeta { $meta = [ 'entity' => $info['name'], 'label' => $info['title'], - 'icon' => $info['icon'], + 'icon' => $info['icon'] ?? NULL, ]; // Custom entities are always type 'join' if (in_array('CustomValue', $info['type'], TRUE)) { -- 2.25.1