浏览代码

Bug fix: creating a new DOM Node containing the string "0" resulted in an empty node (no DOMText).

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

+ 1 - 1
setup/modelfactory.class.inc.php

@@ -2080,7 +2080,7 @@ class MFDocument extends \Combodo\iTop\DesignDocument
 	function createElement($sName, $value = null, $namespaceURI = null)
 	{
 		$oElement = $this->importNode(new MFElement($sName, null, $namespaceURI));
-		if (!empty($value))
+		if (($value !== '') && ($value !== null))
 		{
 			$oElement->appendChild(new DOMText($value));
 		}