Fix warning

This commit is contained in:
Eric Espie
2021-10-13 17:15:58 +02:00
parent 0f149ed852
commit 4305e40ae5

View File

@@ -1017,7 +1017,7 @@ JS
$oAttDef = MetaModel::GetAttributeDef($sClass, $sStateAttrCode);
$aValues = $oAttDef->GetAllowedValues();
foreach ($aStates as $sStateValue) {
$aStateLabels[$sStateValue] = $aValues[$sStateValue];
$aStateLabels[$sStateValue] = $aValues[$sStateValue] ?? '';
$aCounts[$sStateValue] = (array_key_exists($sStateValue, $aCountsQueryResults))
? $aCountsQueryResults[$sStateValue]
: 0;