mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 10:22:14 +01: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
@ -256,18 +256,17 @@ class ContentProxy
|
||||
$entry->setTitle($content['open_graph']['og_title']);
|
||||
}
|
||||
|
||||
$html = $content['html'];
|
||||
if (false === $html) {
|
||||
$html = $this->fetchingErrorMessage;
|
||||
if (empty($content['html'])) {
|
||||
$content['html'] = $this->fetchingErrorMessage;
|
||||
|
||||
if (!empty($content['open_graph']['og_description'])) {
|
||||
$html .= '<p><i>But we found a short description: </i></p>';
|
||||
$html .= $content['open_graph']['og_description'];
|
||||
$content['html'] .= '<p><i>But we found a short description: </i></p>';
|
||||
$content['html'] .= $content['open_graph']['og_description'];
|
||||
}
|
||||
}
|
||||
|
||||
$entry->setContent($html);
|
||||
$entry->setReadingTime(Utils::getReadingTime($html));
|
||||
$entry->setContent($content['html']);
|
||||
$entry->setReadingTime(Utils::getReadingTime($content['html']));
|
||||
|
||||
if (!empty($content['status'])) {
|
||||
$entry->setHttpStatus($content['status']);
|
||||
|
Loading…
Reference in New Issue
Block a user