mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
Object details: Fix "Call to a member function GetMainColor() on null"
This commit is contained in:
@@ -61,10 +61,9 @@ class ObjectDetails extends Panel
|
||||
$this->sObjectName = $oObject->GetRawName();
|
||||
$this->sObjectMode = $sMode;
|
||||
|
||||
$oStyle = MetaModel::GetClassStyle($this->sClassName);
|
||||
$sPanelColor = empty($oStyle->GetMainColor()) ? static::DEFAULT_COLOR : $oStyle->GetMainColor();
|
||||
parent::__construct($this->sObjectName, [], $sPanelColor, $sId);
|
||||
parent::__construct($this->sObjectName, [], static::DEFAULT_COLOR, $sId);
|
||||
|
||||
$this->SetColorFromClass($this->sClassName);
|
||||
$this->ComputeIconUrl($oObject);
|
||||
$this->ComputeState($oObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user