Fixed issue in the data model consistency check

SVN:trunk[1274]
This commit is contained in:
Romain Quetiez
2011-05-24 10:26:16 +00:00
parent 4574126428
commit 64b4922499

View File

@@ -2513,7 +2513,7 @@ abstract class MetaModel
if (!is_null($aAllowedValues))
{
$sDefaultValue = $oAttDef->GetDefaultValue();
if (!array_key_exists($sDefaultValue, $aAllowedValues))
if (is_string($sDefaultValue) && !array_key_exists($sDefaultValue, $aAllowedValues))
{
$aErrors[$sClass][] = "Default value '".$sDefaultValue."' for attribute $sAttCode is not an allowed value";
$aSugFix[$sClass][] = "Please pickup the default value out of {'".implode(", ", array_keys($aAllowedValues))."'}";