Fix PHP8 strtime warning if argument is null (addendum)

This commit is contained in:
jmechnich
2022-10-01 11:05:12 +02:00
parent 42bc1620b8
commit 560caf8377
6 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -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