mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 03:21:01 +00:00
Fix PHP warning
Looks like sometimes (usually from import) the `html` key isn’t available.
This commit is contained in:
parent
a48ff25d4c
commit
8ca858ee73
1 changed files with 6 additions and 7 deletions
|
@ -256,18 +256,17 @@ class ContentProxy
|
||||||
$entry->setTitle($content['open_graph']['og_title']);
|
$entry->setTitle($content['open_graph']['og_title']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$html = $content['html'];
|
if (empty($content['html'])) {
|
||||||
if (false === $html) {
|
$content['html'] = $this->fetchingErrorMessage;
|
||||||
$html = $this->fetchingErrorMessage;
|
|
||||||
|
|
||||||
if (!empty($content['open_graph']['og_description'])) {
|
if (!empty($content['open_graph']['og_description'])) {
|
||||||
$html .= '<p><i>But we found a short description: </i></p>';
|
$content['html'] .= '<p><i>But we found a short description: </i></p>';
|
||||||
$html .= $content['open_graph']['og_description'];
|
$content['html'] .= $content['open_graph']['og_description'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$entry->setContent($html);
|
$entry->setContent($content['html']);
|
||||||
$entry->setReadingTime(Utils::getReadingTime($html));
|
$entry->setReadingTime(Utils::getReadingTime($content['html']));
|
||||||
|
|
||||||
if (!empty($content['status'])) {
|
if (!empty($content['status'])) {
|
||||||
$entry->setHttpStatus($content['status']);
|
$entry->setHttpStatus($content['status']);
|
||||||
|
|
Loading…
Reference in a new issue