N°8395 - php8.1 compatibility in class extended Exception

This commit is contained in:
bdalsass
2025-07-07 14:03:29 +02:00
parent 740f83f43e
commit c8371f1c19
2 changed files with 2 additions and 2 deletions

View File

@@ -1826,7 +1826,7 @@ EOF;
// Search field in parent class
$oField = $this->GetFieldInParentClasses($oClass, $sStateAttCode);
if ($oField == null) {
throw new DOMFormatException("Non existing attribute '$sStateAttCode'", null, null, $oStateAttribute);
throw new DOMFormatException("Non existing attribute '$sStateAttCode'", 0, null, $oStateAttribute);
}
}
$oCodeNodes = $this->oFactory->GetNodes('values/value/code', $oField);

View File

@@ -2040,7 +2040,7 @@ class MFElement extends Combodo\iTop\DesignElement
{
// Houston!
$sXPath = DesignDocument::GetItopNodePath($this);
throw new DOMFormatException("id '$key' already used in $sXPath", null, null, $oItem);
throw new DOMFormatException("id '$key' already used in $sXPath", 0, null, $oItem);
}
$res[$key] = $oItem->GetNodeAsArrayOfItems();
}