1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

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.
This commit is contained in:
Jeremy Benoist 2017-01-10 17:42:34 +01:00
parent e4ccd3effe
commit 3d71d40349
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 42 additions and 1 deletions

View file

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