APIv4 - Add SQL expression handling and aggregate functions
[civicrm-core.git] / Civi / Api4 / Generic / AbstractGetAction.php
index d82e7071b1e6f0328d65c8afae9a774d14e242da..dc020f4af146dd4a8bc88d768c0a33bbebbb319a 100644 (file)
@@ -81,7 +81,7 @@ abstract class AbstractGetAction extends AbstractQueryAction {
    */
   protected function expandSelectClauseWildcards() {
     $wildFields = array_filter($this->select, function($item) {
-      return strpos($item, '*') !== FALSE && strpos($item, '.') === FALSE;
+      return strpos($item, '*') !== FALSE && strpos($item, '.') === FALSE && strpos($item, '(') === FALSE && strpos($item, ' ') === FALSE;
     });
     foreach ($wildFields as $item) {
       $pos = array_search($item, array_values($this->select));