@@ -48,7 +48,7 @@ class CakeErrorController extends AppController {
48
48
function __construct () {
49
49
parent ::__construct ();
50
50
$ this ->_set (Router::getPaths ());
51
- $ this ->params = Router::getParams ();
51
+ $ this ->request = $ this -> params = Router::getRequest ();
52
52
$ this ->constructClasses ();
53
53
$ this ->Component ->initialize ($ this );
54
54
$ this ->_set (array ('cacheAction ' => false , 'viewPath ' => 'errors ' ));
@@ -87,9 +87,9 @@ function __construct($method, $messages) {
87
87
88
88
if ($ __previousError != array ($ method , $ messages )) {
89
89
$ __previousError = array ($ method , $ messages );
90
- $ this ->controller =& new CakeErrorController ();
90
+ $ this ->controller = new CakeErrorController ();
91
91
} else {
92
- $ this ->controller =& new Controller ();
92
+ $ this ->controller = new Controller ();
93
93
$ this ->controller ->viewPath = 'errors ' ;
94
94
}
95
95
$ options = array ('escape ' => false );
@@ -158,7 +158,7 @@ public function error404($params) {
158
158
'code ' => '404 ' ,
159
159
'name ' => __ ('Not Found ' ),
160
160
'message ' => h ($ url ),
161
- 'base ' => $ this ->controller ->base
161
+ 'base ' => $ this ->controller ->request -> base
162
162
));
163
163
$ this ->_outputMessage ('error404 ' );
164
164
}
@@ -172,15 +172,15 @@ public function error500($params) {
172
172
extract ($ params , EXTR_OVERWRITE );
173
173
174
174
if (!isset ($ url )) {
175
- $ url = $ this ->controller ->here ;
175
+ $ url = $ this ->controller ->request -> here ;
176
176
}
177
177
$ url = Router::normalize ($ url );
178
178
$ this ->controller ->header ("HTTP/1.0 500 Internal Server Error " );
179
179
$ this ->controller ->set (array (
180
180
'code ' => '500 ' ,
181
181
'name ' => __ ('An Internal Error Has Occurred ' ),
182
182
'message ' => h ($ url ),
183
- 'base ' => $ this ->controller ->base
183
+ 'base ' => $ this ->controller ->request -> base
184
184
));
185
185
$ this ->_outputMessage ('error500 ' );
186
186
}
0 commit comments