mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Added missing App::uses() statement. Closes #3331
This commit is contained in:
parent
f0e13af0cc
commit
cc6b699db4
3 changed files with 4 additions and 4 deletions
|
@ -19,6 +19,8 @@
|
|||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
/**
|
||||
* Error Handling Controller
|
||||
*
|
||||
|
|
|
@ -142,15 +142,14 @@ class ExceptionRenderer {
|
|||
* @return Controller
|
||||
*/
|
||||
protected function _getController($exception) {
|
||||
App::uses('AppController', 'Controller');
|
||||
App::uses('CakeErrorController', 'Controller');
|
||||
if (!$request = Router::getRequest(true)) {
|
||||
$request = new CakeRequest();
|
||||
}
|
||||
$response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
|
||||
try {
|
||||
if (class_exists('AppController')) {
|
||||
$controller = new CakeErrorController($request, $response);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
if (empty($controller)) {
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
App::uses('ExceptionRenderer', 'Error');
|
||||
App::uses('Controller', 'Controller');
|
||||
App::uses('AppController', 'Controller');
|
||||
App::uses('Component', 'Controller');
|
||||
App::uses('Router', 'Routing');
|
||||
|
||||
|
|
Loading…
Reference in a new issue