From: Simounet Date: Wed, 19 Jul 2017 18:16:23 +0000 (+0200) Subject: Fix updatePublishedAt on already parsed article's date X-Git-Tag: 2.3.0~31^2~36^2~1 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=b236d3f627a21bc9b02e7726bbb72d632937a45e Fix updatePublishedAt on already parsed article's date --- diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 656ac6ee..fd97e0ff 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -122,7 +122,7 @@ class ContentProxy */ public function updatePublishedAt(Entry $entry, $value) { - $date = $value; + $date = $value instanceof \DateTime ? $value->date : $value; // is it a timestamp? if (filter_var($date, FILTER_VALIDATE_INT) !== false) {