Welcome Guest, Not a member yet? Register   Sign In
Turned-Off Errors Showing Up In Error Log

[eluser]Bob Dog[/eluser]
I don't know if this would be considered a bug in CodeIgniter or not, but I will throw it out there for your judgement.

If I have error logging enabled via application/config/config.php:

$config['log_threshold'] = 1;

and I use the PHP convention to temporarily disable error messages (the "@" symbol):

<?php if (@$some_possibly_undefined_variable): ?>

then the error messages don't appear on the screen, but they still show up in the error log. I would really rather not have these messages which I have explicitly turned off cluttering up the error log.

What do you think?

@ does exactly what it says on the tin: it supresses the error message, it doesn't make the error go away.

Using @ is very expensive, and should be avoided where possible. Also, it's an indication of a not very clean programming style (to say it mildly), "possibly_undefined_variables" should not exist in your programs!

Theme © iAndrew 2016 - Forum software by © MyBB