]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/ContentProxy.php
Fix updatePublishedAt on already parsed article's date
[github/wallabag/wallabag.git] / 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) {