Sfoglia il codice sorgente

Fixed issue in the data model consistency check

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1274 a333f486-631f-4898-b8df-5754b55c2be0
romainq 14 anni fa
parent
commit
dab83f8b4f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      core/metamodel.class.php

+ 1 - 1
core/metamodel.class.php

@@ -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))."'}";