Cakephp致命错误呈现问题

时间:2013-01-09 12:26:31

标签: cakephp

我正在使用Cakephp 2.2.4版,它无法呈现致命错误消息(它显示奇怪的字符)。 当我删除行'handler'=>来自核心文件的'ErrorHandler :: handleError',PHP正确显示致命错误。

Here is a link to screenshot of what i see

这是我的核心文件的内容(错误相关):     配置:: write('debug',2);

Configure::write('Exception', array(
    'handler' => 'ErrorHandler::handleException',
    'renderer' => 'ExceptionRenderer',
    'log' => true
));
Configure::write('Error', array(
    'handler' => 'ErrorHandler::handleError',
     'level' => E_ALL & ~E_DEPRECATED & ~E_STRICT,
    'trace' => true
));

由于

2 个答案:

答案 0 :(得分:0)

更新到最近发布的CakePHP 2.2.5版,它显然解决了ExceptionHandler中的一些问题。

答案 1 :(得分:-1)

I just checked and found that I was referencing a model I had not loaded. Loading the model (Actually referencing it through the current model) solved the problem for me.