Skip to content

Commit

Permalink
Return null when there is no feed link.
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Garfield <[email protected]>
  • Loading branch information
Crell committed Nov 18, 2021
1 parent ca74e8c commit 5230b29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Reader/Extension/Atom/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ public function getFeedLink()

$link = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/atom:link[@rel="self"]/@href)');

$link = $this->absolutiseUri($link);
if ($link) {
$link = $this->absolutiseUri($link);
} else {
$link = null;
}

$this->data['feedlink'] = $link;

Expand Down

0 comments on commit 5230b29

Please sign in to comment.