projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #16319 from civicrm/5.22
[civicrm-core.git]
/
api
/
api.php
diff --git
a/api/api.php
b/api/api.php
index cccad8b01740dcb399a87030c4b5f98b80c9f7f9..c5cae1e27f2115ea8a7dd40d000268e6e36dcc78 100644
(file)
--- a/
api/api.php
+++ b/
api/api.php
@@
-63,7
+63,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
$removeIndexField = FALSE;
// If index field is not part of the select query, we add it here and remove it below
- if ($indexField && !empty($params['select']) && is_array($params['select']) && !
in_array
($indexField, $params['select'])) {
+ if ($indexField && !empty($params['select']) && is_array($params['select']) && !
\Civi\Api4\Utils\SelectUtil::isFieldSelected
($indexField, $params['select'])) {
$params['select'][] = $indexField;
$removeIndexField = TRUE;
}
$params['select'][] = $indexField;
$removeIndexField = TRUE;
}