Skip to content

Commit

Permalink
MVC/Exception handling, prevent UserException from being pushed to /t…
Browse files Browse the repository at this point in the history
…mp/PHP_errors.log
  • Loading branch information
AdSchellevis committed Feb 18, 2019
1 parent a22e5a7 commit ab3b5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opnsense/www/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
$response['errorTitle'] = $e->getTitle();
} else {
$response['errorTitle'] = gettext("An API exception occured");
error_log($e);
}
header('HTTP', true, 500);
header("Content-Type: application/json;charset=utf-8");
echo json_encode($response, JSON_UNESCAPED_SLASHES);
error_log($e);
}

0 comments on commit ab3b5b5

Please sign in to comment.