From 9bff31f18f35acba405724f0dacdf20b0c6e8ba4 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Aug 2018 19:11:43 +0000 Subject: [PATCH] Issue 5691: Post dates of feeds sometimes had been wrong --- src/Protocol/Feed.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index c9c750a83f..0709a9550e 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -271,9 +271,14 @@ class Feed { } $updated = XML::getFirstNodeValue($xpath, 'atom:updated/text()', $entry); - if (empty($updated)) { + if (empty($updated) && !empty($published)) { $updated = $published; } + + if (empty($published) && !empty($updated)) { + $published = $updated; + } + if ($published != "") { $item["created"] = $published; } -- 2.39.5