$entry->setContent($html);
$entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
+ if (isset($content['date']) && null !== $content['date']) {
+ $entry->setPublishedAt(new \DateTime($content['date']));
+ }
+
$entry->setLanguage(isset($content['language']) ? $content['language'] : '');
$entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : '');
$entry->setReadingTime(Utils::getReadingTime($html));
$entry->setDomainName($domainName);
}
- if (isset($content['open_graph']['og_image'])) {
+ if (isset($content['open_graph']['og_image']) && $content['open_graph']['og_image']) {
$entry->setPreviewPicture($content['open_graph']['og_image']);
}