mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°3791 - Fix crash when displaying object with a null state value
This commit is contained in:
@@ -7718,15 +7718,15 @@ abstract class MetaModel
|
||||
/**
|
||||
* @param string $sClass
|
||||
* @param string $sAttCode
|
||||
* @param string $sValue
|
||||
* @param string|null $sValue Code of the state value, can be null if allowed by the attribute definition
|
||||
*
|
||||
* @return \ormStyle|null
|
||||
* @throws \Exception
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public static function GetEnumStyle(string $sClass, string $sAttCode, string $sValue = ''): ?ormStyle
|
||||
public static function GetEnumStyle(string $sClass, string $sAttCode, ?string $sValue = ''): ?ormStyle
|
||||
{
|
||||
if (empty($sAttCode)) {
|
||||
if (strlen($sAttCode) === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user