CodeIgniter Forums
Error Messages and Production sites - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Error Messages and Production sites (/showthread.php?tid=21161)



Error Messages and Production sites - El Forum - 08-01-2009

[eluser]dmorin[/eluser]
In Common.php, there's this block of text:

Code:
if (($severity & error_reporting()) == $severity)
{
    $error->show_php_error($severity, $message, $filepath, $line);
}

Why doesn't this take into account the php 'display_errors" ini setting? Seems like this is more appropriate:
Code:
if (($severity & error_reporting()) == $severity && ini_get('display_errors'))
{
    $error->show_php_error($severity, $message, $filepath, $line);
}

Which brings me to another question I've been meaning to ask. Why doesn't CI have an "is_production" config setting? When it's set to TRUE, CI should automatically be hiding error messages, making sure DB errors don't contain the sql, etc. This would be extremely valuable, but I find myself having to add it to every new project I have.