mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
#1060 Internal: improved the symptoms when calling MetaModel::GetAttributeDef with an invalid attribute code (feedback on the class name and no more FATAL errors)
SVN:trunk[3492]
This commit is contained in:
@@ -836,6 +836,10 @@ abstract class MetaModel
|
|||||||
final static public function GetAttributeDef($sClass, $sAttCode)
|
final static public function GetAttributeDef($sClass, $sAttCode)
|
||||||
{
|
{
|
||||||
self::_check_subclass($sClass);
|
self::_check_subclass($sClass);
|
||||||
|
if (!isset(self::$m_aAttribDefs[$sClass][$sAttCode]))
|
||||||
|
{
|
||||||
|
throw new Exception("Unknown attribute $sAttCode from class $sClass");
|
||||||
|
}
|
||||||
return self::$m_aAttribDefs[$sClass][$sAttCode];
|
return self::$m_aAttribDefs[$sClass][$sAttCode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user