Skip to content
Snippets Groups Projects
Commit 1fe83a43 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1113 from greezybacon/issue/custom-list-retired-vals


lists: Don't crash rendering a selection

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 9cc6356d 87488e01
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment