Commit c094ebe8 authored by Robert Lyon's avatar Robert Lyon

Bug 1825092: Check institution is set in autocomplete form element

To avoid error "Undefined index: institution" in
htdocs/lib/form/elements/autocomplete.php line 124

behatnotneeded

Change-Id: Iaf5c0d0de082d787539a6e406a27fd237ed05046
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 663f3b1e
......@@ -121,7 +121,9 @@ function pieform_element_autocomplete(Pieform $form, $element) {
if (isset($element['description'])) {
$smarty->assign('describedby', $form->element_descriptors($element));
}
$smarty->assign('institution', $element['institution']);
if (isset($element['institution'])) {
$smarty->assign('institution', $element['institution']);
}
return $smarty->fetch('form/autocomplete.tpl');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment