Error disabling error reporting in CakePHP

I had a problem turning

Configure::write('debug', 0); 

A short-term error looks something like this:

Strict standards: the non-static CakeLog :: handleError () method should not be called statically in /var/www/.../cake/libs/controller/controller.php on line 373

Note. I am using cakePHP 1.3.7

0
source share
2 answers

I'm not an expert on php cake, but simple installation + test + documentation on .. http://book.cakephp.org/view/1584/Error-logging assumes that when your debug file is disabled to 0, your log is still continues to keep a log of warnings and fatal errors, so for full debugging you may also need to make the logging false.

 Configure::write('log', false); 

Extract: errors are logged when Configure :: write ('debug', 0); Will only log warnings and fatal errors. Configure :: write ('log', false); will disable error logging when debug = 0.

Also in the base .php controller (there is no handleError code in libs / controller / controller.php - was this added by your developers?)

+1
source

Try adding the following to your bootstrap file (/app/config/boostrap.php)

 error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED); 

This is the suggested location for this type of configuration.

0
source

All Articles