• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
disabling PHP Error/Severity notices

Hi folks

I'd like to disable the errors that appear within our application like the following:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: gender

Is there a setting withing CI that will disable this?

[eluser]Adam Griffiths[/eluser]
Line 12 of index.php


Info on error_reporting

Disabling errors is not a good solution. You should prevent errors from happening. in you case you need to add
$gender = '';

somewhere of use this function
function echo_var($name)
   return (isset(${$name})?${$name}:'';
But the first method is a better practice.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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