aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 642ba6f9..2690edbe 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -76,8 +76,8 @@ class ContentProxy
76 $entry->setContent($html); 76 $entry->setContent($html);
77 $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); 77 $entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
78 78
79 $entry->setLanguage($content['language']); 79 $entry->setLanguage(isset($content['language']) ? $content['language'] : '');
80 $entry->setMimetype($content['content_type']); 80 $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : '');
81 $entry->setReadingTime(Utils::getReadingTime($html)); 81 $entry->setReadingTime(Utils::getReadingTime($html));
82 82
83 $domainName = parse_url($entry->getUrl(), PHP_URL_HOST); 83 $domainName = parse_url($entry->getUrl(), PHP_URL_HOST);
@@ -90,7 +90,7 @@ class ContentProxy
90 } 90 }
91 91
92 // if content is an image define as a preview too 92 // if content is an image define as a preview too
93 if (in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { 93 if (isset($content['content_type']) && in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) {
94 $entry->setPreviewPicture($content['url']); 94 $entry->setPreviewPicture($content['url']);
95 } 95 }
96 96