diff options
| author | 2024-12-28 23:58:00 +0100 | |
|---|---|---|
| committer | 2024-12-28 23:58:00 +0100 | |
| commit | c29cbb7b8be95fee249ed1a21dce98a4772d92e2 (patch) | |
| tree | b116f6033ea081c6cc5f82ce83156f2a7021166c /app/Controllers/subscriptionController.php | |
| parent | 33cdfbb309c61167cf1c81273eb242f94ca8f996 (diff) | |
Fix regressions on some array structures (#7155)
regressions from https://github.com/FreshRSS/FreshRSS/pull/7131
fix https://github.com/FreshRSS/FreshRSS/issues/7154
Diffstat (limited to 'app/Controllers/subscriptionController.php')
| -rw-r--r-- | app/Controllers/subscriptionController.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index b1b999a4a..ef2bbed6e 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -93,16 +93,18 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js'))); } - $feedDAO = FreshRSS_Factory::createFeedDao(); - $this->view->feeds = $feedDAO->listFeeds(); - $id = Minz_Request::paramInt('id'); - if ($id === 0 || !isset($this->view->feeds[$id])) { - Minz_Error::error(404); + if ($id === 0) { + Minz_Error::error(400); return; } - $feed = $this->view->feeds[$id]; + $feedDAO = FreshRSS_Factory::createFeedDao(); + $feed = $feedDAO->searchById($id); + if ($feed === null) { + Minz_Error::error(404); + return; + } $this->view->feed = $feed; FreshRSS_View::prependTitle($feed->name() . ' · ' . _t('sub.title.feed_management') . ' · '); |
