Skip to content
Snippets Groups Projects
Commit f7bf6143 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix crash handling API requests which specify topicID

parent d429b5d7
No related branches found
No related tags found
Loading
......@@ -20,9 +20,10 @@ class TicketApiController extends ApiController {
# the names to the supported request structure
if (isset($data['topicId'])
&& ($topic = Topic::lookup($data['topicId']))
&& ($form = $topic->getForm())) {
foreach ($form->getDynamicFields() as $field)
$supported[] = $field->get('name');
&& ($forms = $topic->getForms())) {
foreach ($forms as $form)
foreach ($form->getDynamicFields() as $field)
$supported[] = $field->get('name');
}
# Ticket form fields
......
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