diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index c0a203646ffd02170cf4c5a1eff44778687722d8..a8058d7e9a47e9d7e18a3854f3ae335d4c919e0a 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -1227,8 +1227,8 @@ class SelectionField extends FormField { foreach ($this->getList()->getItems() as $i) $this->_choices[$i->get('id')] = $i->get('value'); if ($this->value && !isset($this->_choices[$this->value])) { - $v = DynamicListItem::lookup($this->value); - $this->_choices[$v->get('id')] = $v->get('value').' (Disabled)'; + if ($v = DynamicListItem::lookup($this->value)) + $this->_choices[$v->get('id')] = $v->get('value').' (Disabled)'; } } return $this->_choices;