N°4517 - PHP 8.1: Fix MFElement::__construct() being called with $namespaceURI as null when it should be strictly a string

MFDocument::createElement() default value for $namespaceURI is now a string
This commit is contained in:
Molkobain
2022-05-18 18:04:07 +02:00
committed by acognet
parent 04dbaef257
commit 9d62e87de4

View File

@@ -2561,12 +2561,14 @@ class MFDocument extends \Combodo\iTop\DesignDocument
*
* @param string $sName
* @param null $value
* @param null $namespaceURI
* @param string $namespaceURI
*
* @return \MFElement
* @throws \Exception
*
* @since 3.1.0 N°4517 $namespaceURI parameter must be empty string by default so
*/
function createElement($sName, $value = null, $namespaceURI = null)
function createElement($sName, $value = null, $namespaceURI = '')
{
/** @var \MFElement $oElement */
$oElement = $this->importNode(new MFElement($sName, null, $namespaceURI));