Merge pull request #5744 from annando/fix-preview

Fix for #5732 - too much links had been detected as photos
This commit is contained in:
Tobias Diekershoff 2018-09-07 09:01:14 +02:00 committed by GitHub
commit c18da1444d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,7 +333,7 @@ class ParseUrl
}
// Prevent to have a photo type without an image
if (empty($siteinfo['image']) && ($siteinfo['type'] == 'photo')) {
if ((empty($siteinfo['image']) || !empty($siteinfo['text'])) && ($siteinfo['type'] == 'photo')) {
$siteinfo['type'] = 'link';
}