From e89a8edae077d04b0504b6ed783dc1b4f6dfc0e1 Mon Sep 17 00:00:00 2001 From: odain Date: Sat, 15 Nov 2025 21:19:01 +0100 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B08306=20-=20fix=20MFEException=20use?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/modelfactory.class.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/modelfactory.class.inc.php b/setup/modelfactory.class.inc.php index f515efc10..9640c5910 100644 --- a/setup/modelfactory.class.inc.php +++ b/setup/modelfactory.class.inc.php @@ -2249,13 +2249,13 @@ EOF; if (!$oExisting) { $sPath = MFDocument::GetItopNodePath($this)."/".$oNode->tagName.(empty($sSearchId) ? '' : "[$sSearchId]"); - throw new MFException('could not be modified (not found)', MFException::COULD_NOT_BE_MODIFIED_NOT_FOUND, $oNode, $sPath, $oParentFallbackNode); + throw new MFException('could not be modified (not found)', MFException::COULD_NOT_BE_MODIFIED_NOT_FOUND, $oNode, $sPath, '', $oParentFallbackNode); } $sPrevFlag = $oExisting->GetAlteration(); $sOldId = $oExisting->getAttribute('_old_id'); if ($oExisting->IsRemoved()) { $sPath = MFDocument::GetItopNodePath($this)."/".$oNode->tagName.(empty($sSearchId) ? '' : "[$sSearchId]"); - throw new MFException('could not be modified (marked as deleted)', MFException::COULD_NOT_BE_MODIFIED_ALREADY_DELETED, $oNode, $sPath, $oParentFallbackNode); + throw new MFException('could not be modified (marked as deleted)', MFException::COULD_NOT_BE_MODIFIED_ALREADY_DELETED, $oNode, $sPath, '', $oParentFallbackNode); } $oExisting->ReplaceWithSingleNode($oNode); if (!$this->IsInDefinition()) { From 7fb0ae48f9025b131239321ab59e698c94fbddf3 Mon Sep 17 00:00:00 2001 From: odain Date: Sat, 15 Nov 2025 21:26:36 +0100 Subject: [PATCH 2/2] Fix deprecated warning Deprecated: Return type of Combodo\iTop\DesignDocument::loadXML(string $source, int $options = 0) should either be compatible with DOMDocument::loadXML(string $source, int $options = 0): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/iTop/core/designdocument.class.inc.php on line 73
--- core/designdocument.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/designdocument.class.inc.php b/core/designdocument.class.inc.php index 5c792024a..5268375b0 100644 --- a/core/designdocument.class.inc.php +++ b/core/designdocument.class.inc.php @@ -71,7 +71,7 @@ class DesignDocument extends DOMDocument $this->preserveWhiteSpace = true; // otherwise the formatOutput option would have no effect } - public function loadXML(string $source, int $options = 0) + public function loadXML(string $source, int $options = 0) : bool { return parent::loadXML($source, $options | LIBXML_BIGLINES); }