2010-08-28 05:37:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Error Handling Controller
|
|
|
|
*
|
|
|
|
* Controller used by ErrorHandler to render error views.
|
|
|
|
*
|
2011-07-26 06:16:14 +00:00
|
|
|
* @package Cake.Controller
|
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-07-03 19:33:27 +00:00
|
|
|
public function __construct($request = null, $response = null) {
|
|
|
|
parent::__construct($request, $response);
|
2010-08-28 05:37:39 +00:00
|
|
|
$this->constructClasses();
|
|
|
|
$this->Components->trigger('initialize', array(&$this));
|
2011-05-16 22:08:51 +00:00
|
|
|
$this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
|
2010-08-28 05:37:39 +00:00
|
|
|
}
|
2010-08-30 03:31:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Escapes the viewVars.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2011-05-28 20:38:46 +00:00
|
|
|
public 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
|
|
|
}
|