Commit 892c7458 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4212 | Broken JSON on response to save new record

Unknown index fixed by isset()
parent 7d1a5bea
......@@ -64,8 +64,13 @@ try {
$answer[API_STATUS] = API_ANSWER_STATUS_SUCCESS;
$answer[API_MESSAGE] = 'save: success';
$answer[API_ELEMENT_UPDATE] = $data[API_ELEMENT_UPDATE];
$answer[API_FORM_UPDATE] = $data[API_FORM_UPDATE];
if (isset($data[API_ELEMENT_UPDATE])) {
$answer[API_ELEMENT_UPDATE] = $data[API_ELEMENT_UPDATE];
}
if (isset($data[API_FORM_UPDATE])) {
$answer[API_FORM_UPDATE] = $data[API_FORM_UPDATE];
}
} catch (qfq\UserFormException $e) {
$answer[API_MESSAGE] = $e->formatMessage();
......
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