From 8acf74c9ed3f27250f93cfbfa5302f3854c5e52f Mon Sep 17 00:00:00 2001 From: whwyy Date: Fri, 26 Apr 2024 15:15:36 +0800 Subject: [PATCH] eee --- ActiveQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActiveQuery.php b/ActiveQuery.php index c9fd4e8..552165d 100644 --- a/ActiveQuery.php +++ b/ActiveQuery.php @@ -154,7 +154,7 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder */ public function count(): int { - return $this->buildCommand($this->select(['count(*)'])->builder->count())->rowCount(); + return $this->buildCommand((clone $this)->select(['count(*)'])->builder->count())->rowCount(); }