May I hide Undefined index error? |
[eluser]Wilianto Indrawan[/eluser]
hello guys, i need your help. May I hide "Undefined index" error from my browser? maybe there is a configuration to set up it. thank you.
[eluser]vrencianz[/eluser]
See http://ellislab.com/codeigniter/user-gui...rrors.html Quote:Note: By default, CodeIgniter displays all PHP errors. You might wish to change this behavior once your development is complete. You'll find the error_reporting() function located at the top of your main index.php file. Disabling error reporting will NOT prevent log files from being written if there are errors.
[eluser]CroNiX[/eluser]
[quote author="Wilianto Indrawan" date="1336719763"]hello guys, i need your help. May I hide "Undefined index" error from my browser? maybe there is a configuration to set up it. thank you.[/quote] It would be much better to use better programming practices and see if it exists before trying to use it instead of hiding your errors or warnings. They're trying to tell you something. Fix the problems instead of hiding them. Code: if (isset($some_array['key']))
[eluser]vrencianz[/eluser]
Yep. Few guys I knew had no problem with that. ... and they insisted to work in that way . Of course, eliminating all errors/warnings/notices is the recommended practice instead of hiding them.
|
Welcome Guest, Not a member yet? Register Sign In |