This commit is contained in:
2023-04-20 22:41:25 +08:00
parent d2029e94a0
commit 08f664e136
2 changed files with 10 additions and 9 deletions
+1 -2
View File
@@ -262,8 +262,7 @@ class ActiveQuery extends Component implements ISqlBuilder
*/
public function count(): int
{
$builder = clone $this->builder;
$data = $this->execute($builder->count())->one();
$data = $this->execute($this->builder->count())->one();
if ($data && is_array($data)) {
return (int)array_shift($data);
}