From 3818bc3f986f041425cfe8c0ed4baf5374091d90 Mon Sep 17 00:00:00 2001 From: Thomas Casteleyn Date: Tue, 12 Sep 2023 17:27:46 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05218=20Fix=20toolkit=20error=20on=20enum?= =?UTF-8?q?=20since=203.0.0=20(#513)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/compiler.class.inc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index d8eb16caf..b47ba1908 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -1807,11 +1807,10 @@ EOF; throw new DOMFormatException("Non existing attribute '$sStateAttCode'", null, null, $oStateAttribute); } } - $oValues = $oField->GetUniqueElement('values'); - $oValueNodes = $oValues->getElementsByTagName('value'); - foreach ($oValueNodes as $oValue) { + $oCodeNodes = $this->oFactory->GetNodes('values/value/code', $oField); + foreach ($oCodeNodes as $oCode) { $sLifecycle .= " MetaModel::Init_DefineState(\n"; - $sLifecycle .= " \"".$oValue->GetText()."\",\n"; + $sLifecycle .= " \"".$oCode->GetText()."\",\n"; $sLifecycle .= " array(\n"; $sLifecycle .= " \"attribute_inherit\" => '',\n"; $sLifecycle .= " \"attribute_list\" => array()\n";