diff --git a/lib/traits/elements.php b/lib/traits/elements.php index 99b7e99..2fd04e9 100644 --- a/lib/traits/elements.php +++ b/lib/traits/elements.php @@ -548,7 +548,7 @@ public function addParamsGrouping($fields = []) { if (is_array($fields) && !empty($fields)) { - $this->groupingParams = array_merge($this->groupingParams, $fields); + $this->groupingParams = array_merge(is_array($this->groupingParams) ? $this->groupingParams : [], $fields); } }