N°3882 - Protection against ormStyle being null for an object

This commit is contained in:
Molkobain
2021-09-24 09:03:56 +02:00
parent eb5e5591d7
commit cf223b583e

View File

@@ -237,7 +237,9 @@ class ObjectDetails extends Panel implements iKeyboardShortcut
$this->sStatusLabel = $oObject->GetStateLabel();
$oStyle = MetaModel::GetEnumStyle($this->sClassName, MetaModel::GetStateAttributeCode($this->sClassName), $this->sStatusCode);
$this->sStatusColor = $oStyle->GetMainColor();
if ($oStyle !== null) {
$this->sStatusColor = $oStyle->GetMainColor();
}
}
}