From 58a20e9a112297db8ccb9003be87609fbad4ebd4 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 13 Jun 2023 09:36:20 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B01646=20-=20Fix=20crash=20in=20case=20no?= =?UTF-8?q?=20value=20return=20(real=20fix=20about=20to=20be=20discussed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/displayblock.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 0d35cb53d..1d58f5380 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -1134,7 +1134,7 @@ JS // N°6394 Make sure to sort elements as defined in the datamodel if (utils::IsNotNullOrEmptyString($sStateAttrCode)) { $oAttDef = MetaModel::GetAttributeDef($sClass, $sStateAttrCode); - $aAllowedValues = $oAttDef->GetAllowedValues(); + $aAllowedValues = $oAttDef->GetAllowedValues() ?? []; $AllowedValuesKeys = array_keys($aAllowedValues); uksort($aStateLabels, function ($sKey1, $sKey2) use ($AllowedValuesKeys) {