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:
55a1358
)
SearchKit - Don't crash afforms with non-dao entities
author
colemanw
<coleman@civicrm.org>
Wed, 6 Sep 2023 20:42:48 +0000
(16:42 -0400)
committer
colemanw
<coleman@civicrm.org>
Wed, 6 Sep 2023 20:42:48 +0000
(16:42 -0400)
ext/search_kit/Civi/Search/Meta.php
patch
|
blob
|
blame
|
history
diff --git
a/ext/search_kit/Civi/Search/Meta.php
b/ext/search_kit/Civi/Search/Meta.php
index 40251f5010dbd76b6a232f7e975caab611fe172c..9fadf2364c8c746c98268cd3dcf312efcd6adcde 100644
(file)
--- a/
ext/search_kit/Civi/Search/Meta.php
+++ b/
ext/search_kit/Civi/Search/Meta.php
@@
-29,8
+29,11
@@
class Meta {
* @return array
*/
public static function getCalcFields($apiEntity, $apiParams): array {
- $calcFields = [];
$api = \Civi\API\Request::create($apiEntity, 'get', $apiParams);
+ if (!is_a($api, '\Civi\Api4\Generic\DAOGetAction')) {
+ return [];
+ }
+ $calcFields = [];
$selectQuery = new \Civi\Api4\Query\Api4SelectQuery($api);
$joinMap = $joinCount = [];
foreach ($apiParams['join'] ?? [] as $join) {