mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix which request is used for error pages.
The most recent request in the request stack should be used, as it is most likely the request containing an exception. Fixes incorrect error pages generated inside requestAction() calls. Fixes #2746
This commit is contained in:
parent
f09e5a36d2
commit
77f698dbcd
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ class ExceptionRenderer {
|
|||
*/
|
||||
protected function _getController($exception) {
|
||||
App::uses('CakeErrorController', 'Controller');
|
||||
if (!$request = Router::getRequest(false)) {
|
||||
if (!$request = Router::getRequest(true)) {
|
||||
$request = new CakeRequest();
|
||||
}
|
||||
$response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
|
||||
|
|
Loading…
Reference in a new issue