Skip to content

Commit

Permalink
APIv4 GetFields - Ignore invalid fields rather than fatal error in ge…
Browse files Browse the repository at this point in the history
…tFields action
  • Loading branch information
colemanw committed May 21, 2022
1 parent da9aa6a commit 489257b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Civi/Api4/Generic/DAOGetFieldsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private function formatValues() {
throw new \API_Exception('Illegal expression');
}
$baoName = CoreUtil::getBAOFromApiName($this->getEntityName());
$options = $baoName::buildOptions($fieldName, $context);
$options = $baoName::buildOptions($fieldName, $context) ?: [];
$this->values[$fieldName] = FormattingUtil::replacePseudoconstant($options, $this->values[$key], TRUE);
unset($this->values[$key]);
}
Expand Down

0 comments on commit 489257b

Please sign in to comment.