I have the following code to control my error reporting. I'm trying to make it so I can tail the error logs in our server, but I do not want any errors to be displayed on the page. I am not trying to simply make errors go away, we do not have any currently.
if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break;
case 'testing':
case 'production':
error_reporting(0);
ini_set('display_errors', 'Off');
break;
default:
exit('The application environment is not set correctly.');
}
}