diff options
Diffstat (limited to 'app/Controllers/indexController.php')
| -rw-r--r-- | app/Controllers/indexController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 21a94d53d..3f5c419f1 100644 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -194,7 +194,7 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { $get = FreshRSS_Context::currentGet(true); if (is_array($get)) { $type = $get[0]; - $id = $get[1]; + $id = (int)$get[1]; } else { $type = $get; $id = 0; @@ -219,7 +219,7 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { case 'f': // We most likely already have the feed object in cache $feed = FreshRSS_CategoryDAO::findFeed($categories, $id); - if ($feed == null) { + if ($feed === null) { $feedDAO = FreshRSS_Factory::createFeedDao(); $feed = $feedDAO->searchById($id); if ($feed == null) { @@ -290,8 +290,9 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { */ public function tosAction(): void { $terms_of_service = file_get_contents(TOS_FILENAME); - if (!$terms_of_service) { + if ($terms_of_service === false) { Minz_Error::error(404); + return; } $this->view->terms_of_service = $terms_of_service; |
