Commit ca403639 authored by Franco Fichtner's avatar Franco Fichtner

mvc: style sweep

(cherry picked from commit 605fb08c)
parent 54290bf3
......@@ -144,7 +144,7 @@ $di->set('router', function () {
});
// exception handling
$di->get('eventsManager')->attach("dispatch:beforeException", function($event, $dispatcher, $exception) {
$di->get('eventsManager')->attach("dispatch:beforeException", function ($event, $dispatcher, $exception) {
switch ($exception->getCode()) {
case Phalcon\Dispatcher::EXCEPTION_HANDLER_NOT_FOUND:
// send to error action on default index controller
......
......@@ -55,7 +55,8 @@ class IndexController extends ControllerBase
$this->response->setJsonContent(
array('message' => $message,
'status' => 400
));
)
);
} else {
$this->getLogger()->error($message);
$this->response->redirect("/", true);
......
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