diff --git a/mod/parse_url.php b/mod/parse_url.php
index 0610531967..5dd7de750b 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -302,11 +302,16 @@ function parse_url_content(&$a) {
$image = "";
- foreach ($siteinfo["images"] as $imagedata)
+ if($siteinfo["image"] != ""){
+ /*
+ Execute below code only if image is present in siteinfo
+ */
+ foreach ($siteinfo["images"] as $imagedata)
if($textmode)
- $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
+ $image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
else
- $image .= '';
+ $image .= '';
+ }
if(strlen($text)) {
if($textmode)