diff --git a/Web/Models/Repositories/Clubs.php b/Web/Models/Repositories/Clubs.php index 04bb30ab..d77eac63 100644 --- a/Web/Models/Repositories/Clubs.php +++ b/Web/Models/Repositories/Clubs.php @@ -53,7 +53,7 @@ class Clubs function getCount(): int { - return sizeof(clone $this->clubs); + return (clone $this->clubs)->count('*'); } function getPopularClubs(): \Traversable diff --git a/Web/Models/Repositories/Posts.php b/Web/Models/Repositories/Posts.php index 89ee58ea..fb32fe6e 100644 --- a/Web/Models/Repositories/Posts.php +++ b/Web/Models/Repositories/Posts.php @@ -252,6 +252,6 @@ class Posts function getCount(): int { - return sizeof(clone $this->posts); + return (clone $this->posts)->count('*'); } } diff --git a/Web/Models/Repositories/Users.php b/Web/Models/Repositories/Users.php index d2f4500e..8e29d866 100644 --- a/Web/Models/Repositories/Users.php +++ b/Web/Models/Repositories/Users.php @@ -142,9 +142,9 @@ class Users function getStatistics(): object { return (object) [ - "all" => sizeof(clone $this->users), - "active" => sizeof((clone $this->users)->where("online > 0")), - "online" => sizeof((clone $this->users)->where("online >= ?", time() - 900)), + "all" => (clone $this->users)->count('*'), + "active" => (clone $this->users)->where("online > 0")->count('*'), + "online" => (clone $this->users)->where("online >= ?", time() - 900)->count('*'), ]; }