Browse Source

Fix argument error

imwald
Nuša Pukšič 3 months ago
parent
commit
d1ffa6c9c8
  1. 4
      src/Factory/ArticleFactory.php

4
src/Factory/ArticleFactory.php

@ -51,7 +51,9 @@ class ArticleFactory @@ -51,7 +51,9 @@ class ArticleFactory
$entity->setImage($tag[1]);
break;
case 'published_at':
$entity->setPublishedAt(\DateTimeImmutable::createFromFormat('U', (string)$tag[1]));
if ($time = \DateTimeImmutable::createFromFormat('U', (string)$tag[1])) {
$entity->setPublishedAt($time);
}
break;
case 't':
$entity->addTopic($tag[1]);

Loading…
Cancel
Save