Skip to content

Commit

Permalink
Merge pull request #20508 from seamuslee001/product_oddness
Browse files Browse the repository at this point in the history
[php8-compat] Fix issue in APIv3 Where by because product has a colum…
  • Loading branch information
seamuslee001 authored Jun 5, 2021
2 parents 7e7347b + cd72683 commit 432fa39
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/v3/Generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,12 @@ function _civicrm_api3_generic_get_metadata_options(&$metadata, $apiRequest, $fi
return;
}

$fieldsToResolve = $apiRequest['params']['options']['get_options'];
if (!is_array($apiRequest['params']['options'])) {
$fieldsToResolve = [];
}
else {
$fieldsToResolve = $apiRequest['params']['options']['get_options'];
}

if (!empty($metadata[$fieldname]['options']) || (!in_array($fieldname, $fieldsToResolve) && !in_array('all', $fieldsToResolve))) {
return;
Expand Down

0 comments on commit 432fa39

Please sign in to comment.