2010-08-28 05:37:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Error Handling Controller
|
|
|
|
*
|
|
|
|
* Controller used by ErrorHandler to render error views.
|
|
|
|
*
|
2010-12-24 18:57:20 +00:00
|
|
|
* @package cake.libs
|
2010-08-28 05:37:39 +00:00
|
|
|
*/
|
|
|
|
class CakeErrorController extends AppController {
|
|
|
|
public $name = 'CakeError';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uses Property
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public $uses = array();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* __construct
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2011-03-11 03:00:08 +00:00
|
|
|
function __construct($request = null) {
|
|
|
|
parent::__construct($request);
|
2010-08-28 05:37:39 +00:00
|
|
|
$this->constructClasses();
|
|
|
|
$this->Components->trigger('initialize', array(&$this));
|
|
|
|
$this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
|
|
|
|
}
|
2010-08-30 03:31:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Escapes the viewVars.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function beforeRender() {
|
2010-08-30 03:38:46 +00:00
|
|
|
parent::beforeRender();
|
2010-08-30 03:31:20 +00:00
|
|
|
foreach ($this->viewVars as $key => $value) {
|
2011-01-02 03:16:12 +00:00
|
|
|
if (!is_object($value)){
|
2010-09-06 21:54:48 +00:00
|
|
|
$this->viewVars[$key] = h($value);
|
|
|
|
}
|
2010-08-30 03:31:20 +00:00
|
|
|
}
|
|
|
|
}
|
2011-01-02 03:16:12 +00:00
|
|
|
}
|