Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
69fe4600c7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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));
 		}