PHP Error reporting when display_errors is off? #1722

Closed
zathrus-writer opened this Issue Aug 16, 2012 · 5 comments

Projects

None yet

4 participants

@zathrus-writer

I believe CodeIgniter only checks whether error_reporting() is enabled and displays errors even when display_errors directive is set to false. This way, we cannot log errors without displaying them to our users if we need this functionality.

I have stumbled upon this today when an external include file changed the error reporting to E_ALL but disabled display_errors completely - I was still presented by a notice error.

@victorhguillen

You can override it from the index.php principal file in the codeigniter folder, and bellow the next line:
case 'development':
error_reporting(E_ALL);
ini_set('display_errors', 1); //ADD this line.
and you will got the sintax error in a codeigniter application.

@zathrus-writer

victor, the problem is not one of DISPLAYING error messages, but on the contrary - problem is that even when I DO NOT want to display errors (but I want to log them, so I set display_errors to false and error reporting to E_ALL), I still get a visible error from CodeIgniter despite display_errors being turned off

@narfbg

This has been resolved in the develop branch.

@narfbg narfbg closed this Oct 5, 2012
@zathrus-writer

amazing, thanks for the info!

@ckdarby

Ah I was pretty sure this was a bug but no one else reported anything odd until recently so I just ignored it when I was having this issue assuming that I must have grabbed a bad develop commit or it was my environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment