From f9507bfb086bc938d76a2c038af337ac08499f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Espi=C3=A9?= Date: Fri, 21 Aug 2026 10:20:27 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- setup/xmldataloader.class.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/xmldataloader.class.inc.php b/setup/xmldataloader.class.inc.php index a953a844f4..4c8df2d05d 100644 --- a/setup/xmldataloader.class.inc.php +++ b/setup/xmldataloader.class.inc.php @@ -185,7 +185,10 @@ class XMLDataLoader foreach ($oXml as $sClass => $oXmlObj) { if (!MetaModel::IsValidClass($sClass)) { SetupLog::Error("Unknown class - $sClass"); - continue; // Trying to load non-existing class, ignore it +if ($bUpdateKeyCacheOnly) { + continue; // A class from the previous data model may no longer exist during an upgrade + } + throw(new Exception("Unknown class - $sClass")); } $iSrcId = (int)$oXmlObj['id']; // Mandatory to cast