N°3791 - Fix crash when displaying object with a null state value

This commit is contained in:
Molkobain
2021-09-28 12:51:21 +02:00
parent 57b08b5b24
commit 4c6a7ca30b
3 changed files with 6 additions and 6 deletions

View File

@@ -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;
}