diff options
author | fox <[email protected]> | 2022-10-01 12:28:15 +0300 |
---|---|---|
committer | fox <[email protected]> | 2022-10-01 12:28:15 +0300 |
commit | 0ac143a29b45e35faf7b636e26d4aa854d95602a (patch) | |
tree | 8b28a34faaac9fd848dad7503db8d6c191f894f6 /classes/feeditem/atom.php | |
parent | 42bc1620b8deda73b96b2e0029c6de79daa5ccca (diff) | |
parent | 560caf837768a39d7e13f067f9221347ad348774 (diff) |
Merge pull request 'Fix PHP8 strtime warning if argument is null (addendum)' (#86) from mechnich/tt-rss:more-strtotime-fixes into master
Reviewed-on: https://dev.tt-rss.org/fox/tt-rss/pulls/86
Diffstat (limited to 'classes/feeditem/atom.php')
-rwxr-xr-x | classes/feeditem/atom.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index 59bf403b3..f6c96f959 100755 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -19,19 +19,19 @@ class FeedItem_Atom extends FeedItem_Common { $updated = $this->elem->getElementsByTagName("updated")->item(0); if ($updated) { - return strtotime($updated->nodeValue); + return strtotime($updated->nodeValue ?? ''); } $published = $this->elem->getElementsByTagName("published")->item(0); if ($published) { - return strtotime($published->nodeValue); + return strtotime($published->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 |