Skip to content

Commit b05ad49

Browse files
authored
trim(): Passing null to parameter #1 ($string) of type string is deprecated
1 parent e8c4a7e commit b05ad49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

framework/db/Query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ public function rightJoin($table, $on = '', $params = [])
10491049

10501050
/**
10511051
* Sets the GROUP BY part of the query.
1052-
* @param string|array|ExpressionInterface $columns the columns to be grouped by.
1052+
* @param string|array|ExpressionInterface|null $columns the columns to be grouped by.
10531053
* Columns can be specified in either a string (e.g. "id, name") or an array (e.g. ['id', 'name']).
10541054
* The method will automatically quote the column names unless a column contains some parenthesis
10551055
* (which means the column contains a DB expression).
@@ -1067,7 +1067,7 @@ public function groupBy($columns)
10671067
{
10681068
if ($columns instanceof ExpressionInterface) {
10691069
$columns = [$columns];
1070-
} elseif (!is_array($columns)) {
1070+
} elseif (!is_array($columns) && !is_null($columns)) {
10711071
$columns = preg_split('/\s*,\s*/', trim($columns), -1, PREG_SPLIT_NO_EMPTY);
10721072
}
10731073
$this->groupBy = $columns;

0 commit comments

Comments
 (0)