projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12308f3
)
APIv4 - Prevent fatal error when looking up pseudoconstant for field with no options
author
Coleman Watts
<coleman@civicrm.org>
Mon, 8 Aug 2022 21:57:30 +0000
(17:57 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 10 Aug 2022 02:28:44 +0000
(22:28 -0400)
Civi/Api4/Utils/FormattingUtil.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Api4/Utils/FormattingUtil.php
b/Civi/Api4/Utils/FormattingUtil.php
index efacccb3de3ee905d0d262f04dced2e3d89a188c..2079d929fe4b2fcf9a9955a67cacc55f28d320d1 100644
(file)
--- 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;
}