]> git.mxchange.org Git - friendica.git/commitdiff
Fix for #5732 - too much links had been detected as photos
authorMichael <heluecht@pirati.ca>
Fri, 7 Sep 2018 06:10:33 +0000 (06:10 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 7 Sep 2018 06:10:33 +0000 (06:10 +0000)
src/Util/ParseUrl.php

index dd39a052a0c529bfccfa4248174848264bec1c16..40cb0b8fc099eaa42763fd4ddbd06ecd062d1185 100644 (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';
                }