Skip to content
Snippets Groups Projects
Commit a3297a25 authored by JediKev's avatar JediKev
Browse files

issue: Retained Deleted ListItem Errors

This addresses an issue where New Tickets will fail for Users with a deleted
ListItem retained in their Contact Information form. This is due to the
system deleting the `list_id` for the ListItem so when we run
`getFilterData()` for the User we can't find the list which causes a fatal
error later down the line. This adds an OR statement to the
`SelectionField::getFilterData()` method to skip said ListItems if no
`list_id` is present.
parent fac1c2db
No related branches found
No related tags found
No related merge requests found
......@@ -1775,7 +1775,8 @@ class SelectionField extends FormField {
// Add in the properties for all selected list items in sub
// labeled by their field id
foreach ($v as $id=>$L) {
if (!($li = DynamicListItem::lookup($id)))
if (!($li = DynamicListItem::lookup($id))
|| !$li->getListId())
continue;
foreach ($li->getFilterData() as $prop=>$value) {
if (!isset($data[$prop]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment