]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix updatePublishedAt on already parsed article's date
authorSimounet <contact@simounet.net>
Wed, 19 Jul 2017 18:16:23 +0000 (20:16 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 24 Jul 2017 14:39:07 +0000 (16:39 +0200)
src/Wallabag/CoreBundle/Helper/ContentProxy.php

index 656ac6eecb93b4430c2bf413787aaf680646a3c9..fd97e0ff8a92473b42ac97abe06f00a4656ad439 100644 (file)
@@ -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) {