From 3d71d40349897fe7293f7a0be86cecfe1141c61b Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 10 Jan 2017 17:42:34 +0100 Subject: Avoid false preview image If the website doesn't provide an og_image, the value will be false and so it'll be saved like that in the database. We prefer to leave it as null instead of false. --- src/Wallabag/CoreBundle/Helper/ContentProxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index 0130bd2b..f222dd88 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -88,7 +88,7 @@ class ContentProxy $entry->setDomainName($domainName); } - if (isset($content['open_graph']['og_image'])) { + if (isset($content['open_graph']['og_image']) && $content['open_graph']['og_image']) { $entry->setPreviewPicture($content['open_graph']['og_image']); } -- cgit v1.2.3