Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating ExceptionRenderer and CakeErrorHandler for Controller changes.

  • Loading branch information...
commit 04147caca881416016ebf81df78e6d8610c77244 1 parent 173e043
@markstory markstory authored markstory committed
View
4 lib/Cake/Controller/CakeErrorController.php
@@ -22,8 +22,8 @@ class CakeErrorController extends AppController {
* @access public
* @return void
*/
- public function __construct($request = null) {
- parent::__construct($request);
+ public function __construct($request = null, $response = null) {
+ parent::__construct($request, $response);
$this->constructClasses();
$this->Components->trigger('initialize', array(&$this));
$this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
View
6 lib/Cake/Error/ExceptionRenderer.php
@@ -22,6 +22,7 @@
App::uses('Sanitize', 'Utility');
App::uses('Router', 'Routing');
+App::uses('CakeResponse', 'Network');
/**
* Exception Renderer.
@@ -148,10 +149,11 @@ protected function _getController($exception) {
if (!$request = Router::getRequest(false)) {
$request = new CakeRequest();
}
+ $response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
try {
- $controller = new CakeErrorController($request);
+ $controller = new CakeErrorController($request, $response);
} catch (Exception $e) {
- $controller = new Controller($request);
+ $controller = new Controller($request, $response);
$controller->viewPath = 'Errors';
}
return $controller;
Please sign in to comment.
Something went wrong with that request. Please try again.