diff options
| author | 2023-03-26 21:42:56 +0200 | |
|---|---|---|
| committer | 2023-03-26 21:42:56 +0200 | |
| commit | 1ee2a3d72d97df34b5531ae6787f996ac8d62a2b (patch) | |
| tree | d018dba8b53d76a9b8c7ab1b2b743edfd9ba2401 /app/Controllers/statsController.php | |
| parent | 59c1405c7d4d014ff693ef6f44400ea06318dc69 (diff) | |
Fix repartitionAction (#5228)
* Fix repartitionAction
Fix https://github.com/FreshRSS/FreshRSS/issues/5227
* Better types
* PHPStan level 6
Diffstat (limited to 'app/Controllers/statsController.php')
| -rw-r--r-- | app/Controllers/statsController.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index d2548dd8d..c5120f479 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -202,10 +202,13 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { FreshRSS_View::appendScript(Minz_Url::display('/scripts/vendor/chart.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/vendor/chart.min.js'))); - $id = Minz_Request::param('id', null); + $id = (int)(Minz_Request::param('id')); + if ($id === 0) { + $id = null; + } $this->view->categories = $categoryDAO->listCategories(); - $this->view->feed = $feedDAO->searchById($id); + $this->view->feed = $id === null ? null : $feedDAO->searchById($id); $this->view->days = $statsDAO->getDays(); $this->view->months = $statsDAO->getMonths(); |
