diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-01-10 17:42:34 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-01-10 17:42:36 +0100 |
commit | 3d71d40349897fe7293f7a0be86cecfe1141c61b (patch) | |
tree | bab62cb86914c10e4ff5cb2161603bc4539a9782 /src/Wallabag/CoreBundle | |
parent | e4ccd3effe8a5561d71d6c5f7c4bd1b23aa5a45b (diff) | |
download | wallabag-3d71d40349897fe7293f7a0be86cecfe1141c61b.tar.gz wallabag-3d71d40349897fe7293f7a0be86cecfe1141c61b.tar.zst wallabag-3d71d40349897fe7293f7a0be86cecfe1141c61b.zip |
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.
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/ContentProxy.php | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
88 | $entry->setDomainName($domainName); | 88 | $entry->setDomainName($domainName); |
89 | } | 89 | } |
90 | 90 | ||
91 | if (isset($content['open_graph']['og_image'])) { | 91 | if (isset($content['open_graph']['og_image']) && $content['open_graph']['og_image']) { |
92 | $entry->setPreviewPicture($content['open_graph']['og_image']); | 92 | $entry->setPreviewPicture($content['open_graph']['og_image']); |
93 | } | 93 | } |
94 | 94 | ||