aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/index/article.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-09-11 17:14:53 +0200
committerGravatar GitHub <noreply@github.com> 2024-09-11 17:14:53 +0200
commitdfac9f5813df7d4c7c812c381364c8898333f559 (patch)
tree978496d0a8d8b0d6b5dbe836c6829296133b337c /app/views/helpers/index/article.phtml
parent31c8846791d4b5316fbc790202f79545c012f9c2 (diff)
PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions * Uniformisation
Diffstat (limited to 'app/views/helpers/index/article.phtml')
-rw-r--r--app/views/helpers/index/article.phtml9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/views/helpers/index/article.phtml b/app/views/helpers/index/article.phtml
index bdc108f1e..0a9c75bcd 100644
--- a/app/views/helpers/index/article.phtml
+++ b/app/views/helpers/index/article.phtml
@@ -4,6 +4,9 @@
/** @var FreshRSS_View $this */
$entry = $this->entry;
$feed = $this->feed;
+ if ($feed === null || $entry === null) {
+ return;
+ }
?>
<article class="flux_content" dir="auto">
<div class="content <?= FreshRSS_Context::userConf()->content_width ?>">
@@ -29,7 +32,7 @@
<div class="item manage">
<a class="bookmark" href="<?= Minz_Url::display($favoriteUrl) ?>" title="<?= _t('conf.shortcut.mark_favorite') ?>"><?= _i($entry->isFavorite() ? 'starred' : 'non-starred') ?></a>
</div>
- <?php } ?>
+ <?php } ?>
<?php } ?>
<div class="item">
<?php if (FreshRSS_Context::userConf()->show_feed_name === 't') { ?>
@@ -42,7 +45,7 @@
<?php
if (FreshRSS_Context::userConf()->topline_link && FreshRSS_Context::userConf()->show_article_icons == 't') { ?>
<div class="item link">
- <a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element" title="<?= _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a>
+ <a target="_blank" rel="noreferrer" href="<?= $entry->link() ?>" class="item-element" title="<?= _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a>
</div>
<?php } ?>
</div>
@@ -93,7 +96,7 @@
<?php
if (FreshRSS_Context::userConf()->topline_link && FreshRSS_Context::userConf()->show_article_icons == 'a') { ?>
<div class="item link">
- <a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element" title="<?= _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a>
+ <a target="_blank" rel="noreferrer" href="<?= $entry->link() ?>" class="item-element" title="<?= _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a>
</div>
<?php } ?>
</div>