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

SVN:trunk[4466]
This commit is contained in:
Denis Flaven
2016-10-27 08:36:26 +00:00
parent 44e329c38d
commit fac22c9729

View File

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