From: Jérémy Benoist Date: Mon, 18 Mar 2019 08:26:33 +0000 (+0100) Subject: Merge pull request #3909 from wallabag/fix/html-not-defined X-Git-Tag: 2.3.8~7 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=bfd69c74e5b4f2ebfcb304b1983bf771c2bb11f7;hp=8ab5dcc467268de67f41ac0d008633edf46ae857;p=github%2Fwallabag%2Fwallabag.git Merge pull request #3909 from wallabag/fix/html-not-defined Fix PHP warning --- diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index d38811a2..31953f12 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -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 .= '

But we found a short description:

'; - $html .= $content['open_graph']['og_description']; + $content['html'] .= '

But we found a short description:

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