eee
This commit is contained in:
+2
-1
@@ -154,7 +154,8 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return $this->buildCommand((clone $this)->select(['count(*)'])->builder->count())->rowCount();
|
$search = $this->buildCommand((clone $this)->select(['count(*)'])->builder->count())->one();
|
||||||
|
return !$search ? 0 : current($search);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user