From c2a93db276138902ac413a627cf50b4e1a116910 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 8 Aug 2022 17:57:30 -0400 Subject: [PATCH] APIv4 - Prevent fatal error when looking up pseudoconstant for field with no options --- Civi/Api4/Utils/FormattingUtil.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Civi/Api4/Utils/FormattingUtil.php b/Civi/Api4/Utils/FormattingUtil.php index efacccb3de..2079d929fe 100644 --- a/Civi/Api4/Utils/FormattingUtil.php +++ b/Civi/Api4/Utils/FormattingUtil.php @@ -211,7 +211,7 @@ class FormattingUtil { // Evaluate pseudoconstant suffixes $suffix = strrpos(($fieldName ?? ''), ':'); $fieldOptions = NULL; - if ($suffix) { + if (isset($value) && $suffix) { $fieldOptions = self::getPseudoconstantList($field, $fieldName, $result, $action); $dataType = NULL; } -- 2.25.1