Merge pull request #3909 from wallabag/fix/html-not-defined

Fix PHP warning
This commit is contained in:
Jérémy Benoist 2019-03-18 09:26:33 +01:00 committed by GitHub
commit bfd69c74e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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']);