views:

70

answers:

3

I've stopped receiving error messages in my CakePHP app. Normally error messages are suppressed if you have debug set to 0; if it is 1 or 2 then you get the error message, (plus stack trace, etc.) But I don't get anything if there is an error, regardless of my debug setting. So if I introduce an error (syntax, logic, whatever) all I get is a blank page, with no indication of line number or anything. The error seems to be getting swallowed somewhere, but I can't find where. ini_get('error_reporting') returns E_ALL.

This did work, so I have almost certainly broken it myself. I just need some indication of where to start looking to try and fix it. Thanks!

+1  A: 

you could start looking in yout initiasation methods to check if the debug setting has been changed somewhere to 0.
some places to start looking could be: AppController::beforeFilter() and the current controller's beforeFilter().
You could also have a look at the other hooks, just to make sure...

You can also try to issue a Configure::write('debug', 2); right before creating an erroneuous statement.

Nicky De Maeyer
A: 

Check that there isn't a custom error handler which is hiding all the errors from you. The function which would define one is called set_error_handler.

nickf
A: 

Check if you're importing any 3rd party libraries which may set the error reporting to a different level.

deceze