From: Daniel Siepmann Date: Tue, 17 Jan 2023 06:17:01 +0000 (+0100) Subject: Properly handle feed item creation date with surrounding whitespace X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=da58b894a4239e95342524eeacb85af7bf6c5a9d;p=friendica.git Properly handle feed item creation date with surrounding whitespace Some feeds might have whitespace around the creation date. This can't be parsed by DateTimeFormat methods. Therefore the incoming creation date is trimmed to not contain any surrounding whitespace for proper handling. Relates: #12686 --- diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index ccbe35e712..be58b9aa8f 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -376,11 +376,11 @@ class Feed } if ($published != '') { - $item['created'] = $published; + $item['created'] = trim($published); } if ($updated != '') { - $item['edited'] = $updated; + $item['edited'] = trim($updated); } if (!$dryRun) {