diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 050c8f3305635db0263018acac50f4c4805fc7eb..fcbeeb897a8a9e358e03e065de9216f1bdd7ce68 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -1237,8 +1237,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;