• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
switching off error messages

#1
[eluser]Unknown[/eluser]
I am having problems switching off error messages in production code.

Here is a part of index.php


if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break;

case 'testing':
case 'production':
ini_set('display_errors', 'Off');
break;

default:
exit('The application environment is not set correctly.');
}
}


ini_set('display_errors', 'Off'); should do it .... or might it conflict with php.ini settings on the production server ?

Any thoughts ?

THanks.


#2
[eluser]TheFuzzy0ne[/eluser]
Sorry, but what is it you're having problems with? From what I can see, what you have should do the trick. All you're doing it overriding the php.ini setting for the current request. It's not permanent, and shouldn't conflict with anything.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.