mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
Loading the CakeErrorController
This commit is contained in:
parent
e3f85ccda8
commit
e425b68a86
2 changed files with 1 additions and 1 deletions
48
lib/Cake/Controller/CakeErrorController.php
Normal file
48
lib/Cake/Controller/CakeErrorController.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/**
|
||||
* Error Handling Controller
|
||||
*
|
||||
* Controller used by ErrorHandler to render error views.
|
||||
*
|
||||
* @package cake
|
||||
* @subpackage cake.cake.libs
|
||||
*/
|
||||
class CakeErrorController extends AppController {
|
||||
public $name = 'CakeError';
|
||||
|
||||
/**
|
||||
* Uses Property
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $uses = array();
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->_set(Router::getPaths());
|
||||
$this->request = $this->params = Router::getRequest(false);
|
||||
$this->constructClasses();
|
||||
$this->Components->trigger('initialize', array(&$this));
|
||||
$this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes the viewVars.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function beforeRender() {
|
||||
parent::beforeRender();
|
||||
foreach ($this->viewVars as $key => $value) {
|
||||
if (!is_object($value)){
|
||||
$this->viewVars[$key] = h($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue