From 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 May 2023 13:02:04 +0200 Subject: A few additional PHPStan rules (#5388) A subset of https://github.com/phpstan/phpstan-strict-rules --- app/Models/StatsDAO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/StatsDAO.php') diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php index fb21407a5..53219843e 100644 --- a/app/Models/StatsDAO.php +++ b/app/Models/StatsDAO.php @@ -58,7 +58,7 @@ SQL; */ public function calculateEntryCount(): array { $count = $this->initEntryCountArray(); - $midnight = mktime(0, 0, 0); + $midnight = mktime(0, 0, 0) ?: 0; $oldest = $midnight - (self::ENTRY_COUNT_PERIOD * 86400); // Get stats per day for the last 30 days -- cgit v1.2.3