Skip to content

Commit

Permalink
change to be compatible with recent core updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arroyo committed Jan 26, 2017
1 parent 2a0145c commit 902e7ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/bootstrap.php
Expand Up @@ -23,7 +23,7 @@
/**
* Hooks
*/
ToroHook::add("404", function ($vars = array()) {
\erdiko\core\ToroHook::add("404", function ($vars = array()) {
// Toro::serve Legacy
$vars['debug'] = \erdiko\core\ErrorHandler::isDebug();
if (empty($vars['message'])) {
Expand All @@ -50,7 +50,7 @@
$response->send();
});

ToroHook::add("500", function ($vars = array()) {
\erdiko\core\ToroHook::add("500", function ($vars = array()) {
// Toro::serve Legacy
$vars['debug'] = \erdiko\core\ErrorHandler::isDebug();
$vars['code'] = 500;
Expand All @@ -69,7 +69,7 @@
});

// Error management & beautify output.
ToroHook::add("general_error", function ($vars = array()) {
\erdiko\core\ToroHook::add("general_error", function ($vars = array()) {
$vars['debug'] = \erdiko\core\ErrorHandler::isDebug();
if(!isset($vars['path_info'])){
$vars['path_info'] = $_SERVER['REQUEST_URI'];
Expand Down
3 changes: 1 addition & 2 deletions public/default/index.php
Expand Up @@ -14,8 +14,7 @@

try {
\erdiko\core\ErrorHandler::init(); // Front-end error management
$routes = Erdiko::getRoutes(getenv('ERDIKO_CONTEXT'));
Toro::serve($routes);
Erdiko::serve();

} catch (\Exception $e) {
echo $e->getMessage();
Expand Down

0 comments on commit 902e7ae

Please sign in to comment.