mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-31 12:45:40 -04:00
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 <l.sanchez-prestataire@alptis.fr> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user