diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index d6a9ee6..e35bf05 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -980,7 +980,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq * * @return $this */ - public function groupBy(string $name, string $having = NULL): static + public function groupBy(string $name, ?string $having = NULL): static { $this->group = $name; if (empty($having)) {