]> git.mxchange.org Git - friendica.git/commitdiff
Invalid pictures could lead to notices, this is removed now
authorMichael <heluecht@pirati.ca>
Fri, 31 Aug 2018 07:48:44 +0000 (07:48 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 31 Aug 2018 07:48:44 +0000 (07:48 +0000)
include/items.php

index 2d7597dcd68c6666a090fad3cc67607cd308421e..9fd557a77885838ee1cd7b415eacac99b67a75d0 100644 (file)
@@ -72,7 +72,8 @@ function add_page_info_data(array $data, $no_photos = false)
                $text .= " title='".$data["title"]."'";
        }
 
-       if (!empty($data["images"])) {
+       // Only embedd a picture link when it seems to be a valid picture ("width" is set)
+       if (!empty($data["images"]) && !empty($data["images"][0]["width"])) {
                $preview = str_replace(["[", "]"], ["&#91;", "&#93;"], htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false));
                // if the preview picture is larger than 500 pixels then show it in a larger mode
                // But only, if the picture isn't higher than large (To prevent huge posts)