浏览代码

Do not create a "mailto" hyperlink for empty email addresses.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@927 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 年之前
父节点
当前提交
e4bed83258
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      core/attributedef.class.inc.php

+ 1 - 0
core/attributedef.class.inc.php

@@ -1091,6 +1091,7 @@ class AttributeEmailAddress extends AttributeString
 
 
 	public function GetAsHTML($sValue)
 	public function GetAsHTML($sValue)
 	{
 	{
+		if (empty($sValue)) return '';
 		return '<a class="mailto" href="mailto:'.$sValue.'">'.parent::GetAsHTML($sValue).'</a>';
 		return '<a class="mailto" href="mailto:'.$sValue.'">'.parent::GetAsHTML($sValue).'</a>';
 	}
 	}
 }
 }