cakephp2-php8/lib/Cake/Controller/CakeErrorController.php

46 lines
856 B
PHP
Raw Normal View History

<?php
/**
* Error Handling Controller
*
* Controller used by ErrorHandler to render error views.
*
* @package cake.libs
*/
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() {
2010-08-30 03:38:46 +00:00
parent::beforeRender();
foreach ($this->viewVars as $key => $value) {
2011-01-02 03:16:12 +00:00
if (!is_object($value)){
$this->viewVars[$key] = h($value);
}
}
}
2011-01-02 03:16:12 +00:00
}