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

SVN:2.3[4464]
This commit is contained in:
Denis Flaven
2016-10-27 08:29:48 +00:00
parent 49f72aee28
commit e6aafc165b

View File

@@ -2070,7 +2070,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));
}