mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
N°4326 - Improve robustness of DesignerComboField::SetAllowedValues()
This commit is contained in:
@@ -1218,8 +1218,13 @@ class DesignerComboField extends DesignerFormField
|
||||
}
|
||||
}
|
||||
|
||||
public function SetAllowedValues($aAllowedValues)
|
||||
public function SetAllowedValues(?array $aAllowedValues)
|
||||
{
|
||||
// Make sure to have an actual array for values
|
||||
if (is_null($aAllowedValues)) {
|
||||
$aAllowedValues = [];
|
||||
}
|
||||
|
||||
$this->aAllowedValues = $aAllowedValues;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user