From 99244d33f504349e4e11e5d3a6d0a3c505f12fee Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 7 Sep 2018 06:10:33 +0000 Subject: [PATCH] Fix for #5732 - too much links had been detected as photos --- src/Util/ParseUrl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index dd39a052a0..40cb0b8fc0 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -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'; }