mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 16:48:42 +02:00
N°4326 - Fix unknown attribute when no state attcode is given
This commit is contained in:
@@ -7726,6 +7726,10 @@ abstract class MetaModel
|
||||
*/
|
||||
public static function GetEnumStyle(string $sClass, string $sAttCode, string $sValue = ''): ?ormStyle
|
||||
{
|
||||
if (empty($sAttCode)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$oAttDef = self::GetAttributeDef($sClass, $sAttCode);
|
||||
if (!$oAttDef instanceof AttributeEnum) {
|
||||
throw new CoreException("MetaModel::GetEnumStyle() Attribute $sAttCode of class $sClass is not an AttributeEnum\n");
|
||||
|
||||
Reference in New Issue
Block a user