1
0
Fork 0

Merge pull request #401 from copyninja/master

Image part of Site should be accessed only if its present
This commit is contained in:
friendica 2012-07-22 00:47:56 -07:00
commit 691e770a68

View file

@ -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)