Skip to content

Commit 3818bc3

Browse files
authored
N°5218 Fix toolkit error on enum since 3.0.0 (#513)
1 parent d8ec900 commit 3818bc3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

setup/compiler.class.inc.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,11 +1807,10 @@ protected function RegisterEventListeners()
18071807
throw new DOMFormatException("Non existing attribute '$sStateAttCode'", null, null, $oStateAttribute);
18081808
}
18091809
}
1810-
$oValues = $oField->GetUniqueElement('values');
1811-
$oValueNodes = $oValues->getElementsByTagName('value');
1812-
foreach ($oValueNodes as $oValue) {
1810+
$oCodeNodes = $this->oFactory->GetNodes('values/value/code', $oField);
1811+
foreach ($oCodeNodes as $oCode) {
18131812
$sLifecycle .= " MetaModel::Init_DefineState(\n";
1814-
$sLifecycle .= " \"".$oValue->GetText()."\",\n";
1813+
$sLifecycle .= " \"".$oCode->GetText()."\",\n";
18151814
$sLifecycle .= " array(\n";
18161815
$sLifecycle .= " \"attribute_inherit\" => '',\n";
18171816
$sLifecycle .= " \"attribute_list\" => array()\n";

0 commit comments

Comments
 (0)