From c70e1f8012ac47baa243d3032846e832c26e9bc4 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 3 Jul 2024 17:17:43 +0200 Subject: [statistics_reporting] Error checking --- modules-available/statistics_reporting/page.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php index ec4bbf1a..2a0f5823 100644 --- a/modules-available/statistics_reporting/page.inc.php +++ b/modules-available/statistics_reporting/page.inc.php @@ -287,7 +287,7 @@ class Page_Statistics_Reporting extends Page } } - private function fetchData(int $flags) + private function fetchData(int $flags): array { // TODO: Make all modes location-aware, filter while querying, not after switch ($this->type) { @@ -327,8 +327,9 @@ class Page_Statistics_Reporting extends Page return GetData::perUser($flags); case 'vm': return GetData::perVM($flags); + default: + ErrorHandler::traceError('Unexpected value'); } - return false; } } -- cgit v1.2.3-55-g7522