mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-04 22:48:48 +00:00
Prevent undefined index when import fetching fails
This commit is contained in:
parent
36e6ef52a1
commit
e858018fdd
1 changed files with 3 additions and 3 deletions
|
@ -76,8 +76,8 @@ class ContentProxy
|
|||
$entry->setContent($html);
|
||||
$entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
|
||||
|
||||
$entry->setLanguage($content['language']);
|
||||
$entry->setMimetype($content['content_type']);
|
||||
$entry->setLanguage(isset($content['language']) ? $content['language'] : '');
|
||||
$entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : '');
|
||||
$entry->setReadingTime(Utils::getReadingTime($html));
|
||||
|
||||
$domainName = parse_url($entry->getUrl(), PHP_URL_HOST);
|
||||
|
@ -90,7 +90,7 @@ class ContentProxy
|
|||
}
|
||||
|
||||
// if content is an image define as a preview too
|
||||
if (in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) {
|
||||
if (isset($content['content_type']) && in_array($this->mimeGuesser->guess($content['content_type']), ['jpeg', 'jpg', 'gif', 'png'], true)) {
|
||||
$entry->setPreviewPicture($content['url']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue