N°6043 - Booking: Add prerequisites in iTop core - Attribute extensibility

This commit is contained in:
Pierre Goiffon
2023-03-16 10:44:32 +01:00
parent fa17a7db2d
commit d8d8756623
4 changed files with 70 additions and 56 deletions

View File

@@ -3914,7 +3914,11 @@ PHP;
$aDefinition['type'] = $oNode->GetText();
}
if ($oNode = $oProperty->GetOptionalElement('default')) {
$aDefinition['default'] = $oNode->GetText();
if ($aDefinition['type'] === 'string') {
$aDefinition['default'] = $oNode->GetText('');
} else {
$aDefinition['default'] = $oNode->GetText();
}
}
return $aDefinition;