From 15745d42b779ad14efde2932ab116f45eee39246 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:11:04 +0100 Subject: Upgrade code to php 8.1 (#6748) * revert Fix code indentation Fix code Upgrade code to php 8.1 * fix remarques * code review * code review * code review * Apply suggestions from code review * code review * Fixes * Many remainging updates of array syntax * Lost case 'reading-list' * Uneeded PHPDoc --------- Co-authored-by: Luc Sanchez Co-authored-by: Alexandre Alapetite --- app/Controllers/feedController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 89f3d65b1..60ee6d579 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -343,7 +343,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { // We try to get more information about the feed. $this->view->feed->load(true); $this->view->load_ok = true; - } catch (Exception $e) { + } catch (Exception) { $this->view->load_ok = false; } @@ -793,9 +793,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { private static function applyLabelActions(int $nbNewEntries): int|false { $tagDAO = FreshRSS_Factory::createTagDao(); $labels = FreshRSS_Context::labels(); - $labels = array_filter($labels, static function (FreshRSS_Tag $label) { - return !empty($label->filtersAction('label')); - }); + $labels = array_filter($labels, static fn(FreshRSS_Tag $label) => !empty($label->filtersAction('label'))); if (count($labels) <= 0) { return 0; } @@ -1203,7 +1201,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $this->view->selectorSuccess = false; $this->view->htmlContent = $entry->content(false); } - } catch (Exception $e) { + } catch (Exception) { $this->view->fatalError = _t('feedback.sub.feed.selector_preview.http_error'); } } -- cgit v1.2.3