Permalink
Browse files

Fixed exception override bug

Signed-off-by: dchill42 <dchill42@gmail.com>
  • Loading branch information...
1 parent bbd3b98 commit 11392a17684430d67f945bd6f269eeae7a30d2b3 @dchill42 committed Sep 26, 2012
Showing with 17 additions and 3 deletions.
  1. +17 −3 system/core/Exceptions.php
View
@@ -116,7 +116,11 @@ public function show_404($page = '', $log_error = TRUE)
set_status_header(404);
// Route the error to a controller or 404 template and exit
- $this->_route_error('404_override', 'error_404', array($heading, 'The page you requested was not found.'));
+ $args = array(
+ 'heading' => $heading,
+ 'message' => 'The page you requested was not found.'
+ );
+ $this->_route_error('404_override', 'error_404', $args);
exit;
}
@@ -144,7 +148,11 @@ public function show_error($heading, $message, $template = 'error_general', $sta
set_status_header(500);
// Route the error to a controller or error template and exit
- $this->_route_error('error_override', 'error_general', array($heading, $message));
+ $args = array(
+ 'heading' => $heading,
+ 'message' => $message
+ );
+ $this->_route_error('error_override', 'error_general', $args);
exit;
}
@@ -172,7 +180,13 @@ public function show_php_error($severity, $message, $filepath, $line)
}
// Route the error to a controller or exception template
- $this->_route_error('exception_override', 'error_php', array($severity, $message, $filepath, $line));
+ $args = array(
+ 'severity' => $severity,
+ 'message' => $message,
+ 'filepath' => $filepath,
+ 'line' => $line
+ );
+ $this->_route_error('exception_override', 'error_php', $args);
}
// --------------------------------------------------------------------

0 comments on commit 11392a1

Please sign in to comment.