mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-26 00:37:18 +00:00
45 lines
862 B
PHP
45 lines
862 B
PHP
<?php
|
|
/**
|
|
* Error Handling Controller
|
|
*
|
|
* Controller used by ErrorHandler to render error views.
|
|
*
|
|
* @package Cake.Controller
|
|
*/
|
|
class CakeErrorController extends AppController {
|
|
public $name = 'CakeError';
|
|
|
|
/**
|
|
* Uses Property
|
|
*
|
|
* @var array
|
|
*/
|
|
public $uses = array();
|
|
|
|
/**
|
|
* __construct
|
|
*
|
|
* @access public
|
|
* @return void
|
|
*/
|
|
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'));
|
|
}
|
|
|
|
/**
|
|
* Escapes the viewVars.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function beforeRender() {
|
|
parent::beforeRender();
|
|
foreach ($this->viewVars as $key => $value) {
|
|
if (!is_object($value)){
|
|
$this->viewVars[$key] = h($value);
|
|
}
|
|
}
|
|
}
|
|
}
|