I'm testing some code in a production environment. I have FUEL_ENV set to production. When I get an error it shows the correct error page without a backtrace, but it also shows an error at the top of the page with the file and line number. Changing to the development environment removes the error and shows it in the "Prior Contents" section of the error page.
e.g.
Fatal error: Class 'Foo' not found in /var/www/localhost/fuel/app/classes/controller/test.php on line 5
I found this line in index.php:
ini_set('display_errors', 1);
Changing this to 0 removes the error. Is there a reason display_errors isn't set from a config file? The comment at the top of index.php says this should be changed, but it's very easy to miss. Or is there something else I have not configured correctly?
Thanks
It's a bit of a chicken and egg situation: you want error reporting and display on as early as possible to catch everything. Which means relying on a config file is way to late in the bootstrap process.
Having said that it's probably logical to have the option in an environment config file so you can override the default in your index.php file.
Can you create an issue for this on http://github.com/fuel/core/issues so it can be looked at?