diff options
author | friendica <info@friendica.com> | 2012-07-22 05:13:29 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-22 05:13:29 -0700 |
commit | 1f313eba500e7fa78dd2a6062856aa5f755a300c (patch) | |
tree | ded3805c7e2319e77cbd51681e570ba7b3fee7f7 /mod/parse_url.php | |
parent | 236ba8badcca39206e5a8595af5c1464bba2863e (diff) | |
download | volse-hubzilla-1f313eba500e7fa78dd2a6062856aa5f755a300c.tar.gz volse-hubzilla-1f313eba500e7fa78dd2a6062856aa5f755a300c.tar.bz2 volse-hubzilla-1f313eba500e7fa78dd2a6062856aa5f755a300c.zip |
upstream fixes
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r-- | mod/parse_url.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mod/parse_url.php b/mod/parse_url.php index 061053196..5dd7de750 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 .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />'; + $image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />'; + } if(strlen($text)) { if($textmode) |