Retrofit from trunk: Bug fix: protect against a non existing Contact class (a rather drastic iTop customization!)

SVN:2.3[4560]
This commit is contained in:
Denis Flaven
2017-02-24 14:11:24 +00:00
parent 47587fb97e
commit 3c384ff498
2 changed files with 7 additions and 3 deletions

View File

@@ -1408,8 +1408,12 @@ class RunTimeIconSelectionField extends DesignerIconSelectionField
public function GetDefaultValue($sClass = 'Contact')
{
$sIconPath = MetaModel::GetClassIcon($sClass, false);
$sIcon = str_replace(utils::GetAbsoluteUrlModulesRoot(), '', $sIconPath);
$sIcon = '';
if (MetaModel::IsValidClass($sClass))
{
$sIconPath = MetaModel::GetClassIcon($sClass, false);
$sIcon = str_replace(utils::GetAbsoluteUrlModulesRoot(), '', $sIconPath);
}
return $sIcon;
}
}