Fixed regression: server status was reset

SVN:trunk[161]
This commit is contained in:
Romain Quetiez
2009-09-16 07:53:12 +00:00
parent 6e4da54706
commit 7b6295f0a0
2 changed files with 13 additions and 5 deletions

View File

@@ -649,6 +649,10 @@ abstract class MetaModel
if (!empty($sStateAttCode))
{
$aStates = MetaModel::EnumStates($sClass);
if (!array_key_exists($sState, $aStates))
{
throw new CoreException("Invalid state '$sState' for class '$sClass', expecting a value in {".implode(', ', array_keys($aStates))."}");
}
$aCurrentState = $aStates[$sState];
if ( (array_key_exists('attribute_list', $aCurrentState)) && (array_key_exists($sAttCode, $aCurrentState['attribute_list'])) )
{