From 38fd21019be46189ac7cccadca0159f6a34c56c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 31 Aug 2018 07:48:44 +0000 Subject: [PATCH] Invalid pictures could lead to notices, this is removed now --- include/items.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 2d7597dcd6..9fd557a778 100644 --- a/include/items.php +++ b/include/items.php @@ -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(["[", "]"], ["[", "]"], 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)