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