在禁用CakePHP中的错误报告时出错 [英] Error while Disabling error reporting in CakePHP
问题描述
我在转换时遇到问题
配置:: write('debug',0)
简短错误如下所示:
严格标准:非静态方法CakeLog :: handleError()不应该在第373行的/var/www/.../cake/libs/controller/controller.php中静态调用
注意:我使用 cakePHP 1.3.7
蛋糕php专家 - 但一个简单的安装+测试+文档.. ..
http ://book.cakephp.org/view/1584/Error-logging 建议,当你的调试变为0,你的日志记录仍然继续记录警告和致命错误,因此完全打开调试你也可能需要日志转为false。
配置:: write('log',false);提取:当Configure :: write('debug',0)时,错误现在被记录。将仅记录警告和致命错误。设置Configure :: write('log',false);将在debug = 0时禁用错误日志记录。
同样在base controller.php中(在libs / controller / controller.php没有handleError代码 - 您的开发人员?)
I'm facing an issue while turning
Configure::write('debug', 0);
The brief error looks something like:
Strict Standards: Non-static method CakeLog::handleError() should not be called statically in /var/www/.../cake/libs/controller/controller.php on line 373
Note: I'm using cakePHP 1.3.7
解决方案 Im no expert on cake php - but a simple install + test + documentation at ..
http://book.cakephp.org/view/1584/Error-logging suggests that when your debug is turned to 0, your logging still continues logging for warnings and fatal errors therefore to turn of debug completely you also may need the logging turned to false.
Configure::write('log', false);
Extract: Errors are now logged when Configure::write('debug', 0); Would log only warning and fatal errors. Setting Configure::write('log', false); will disable error logging when debug = 0.
Also in the base controller.php (at libs/controller/controller.php there is no handleError code - was this added by your developers?)
这篇关于在禁用CakePHP中的错误报告时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!