From 560caf837768a39d7e13f067f9221347ad348774 Mon Sep 17 00:00:00 2001 From: jmechnich Date: Sat, 1 Oct 2022 11:05:12 +0200 Subject: Fix PHP8 strtime warning if argument is null (addendum) --- classes/feeditem/rss.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes/feeditem/rss.php') diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index 132eabff5..e07fd1d06 100755 --- a/classes/feeditem/rss.php +++ b/classes/feeditem/rss.php @@ -17,13 +17,13 @@ class FeedItem_RSS extends FeedItem_Common { $pubDate = $this->elem->getElementsByTagName("pubDate")->item(0); if ($pubDate) { - return strtotime($pubDate->nodeValue); + return strtotime($pubDate->nodeValue ?? ''); } $date = $this->xpath->query("dc:date", $this->elem)->item(0); if ($date) { - return strtotime($date->nodeValue); + return strtotime($date->nodeValue ?? ''); } // consistent with strtotime failing to parse -- cgit v1.2.3