X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fapi.php;h=9ed9747dd0ca0b672fac76462c2f0f9ab911e6b2;hb=17bfa11c45ad7ecc9c88df3ad47cfd8be8ae47b4;hp=7e45ab2ae62d6a35494e63e2225ffa823770074e;hpb=da3e08ea04b2ab2513bc92c6e410d33e7bb235c8;p=civicrm-core.git diff --git a/api/api.php b/api/api.php index 7e45ab2ae6..9ed9747dd0 100644 --- a/api/api.php +++ b/api/api.php @@ -64,7 +64,7 @@ function civicrm_api4(string $entity, string $action, array $params = [], $index $removeIndexField = FALSE; // If index field is not part of the select query, we add it here and remove it below (except for oddball "Setting" api) - if ($indexField && !empty($params['select']) && is_array($params['select']) && $entity !== 'Setting' && !\Civi\Api4\Utils\SelectUtil::isFieldSelected($indexField, $params['select'])) { + if ($indexField && !empty($params['select']) && is_array($params['select']) && !($entity === 'Setting' && $action === 'get') && !\Civi\Api4\Utils\SelectUtil::isFieldSelected($indexField, $params['select'])) { $params['select'][] = $indexField; $removeIndexField = TRUE; }