How do I override the EE2 control panel settings for error reporting? (v2.1.3).
The Debug Preference in the CP has only 2 states, “on” or “off”, but I want to achieve something like this:
error_reporting(E_ALL);
ini_set('log_errors', '1');
ini_set('display_errors', '0');I have tried putting the above in the index.php startup file - but it is (apparently) overridden by the EE CP setting.
NOTE: this has nothing to do with server restrictions - these settings work fine outside of EE.
Do I need to hack EE in some way to fix this? - it’s a big problem right now in testing our site becasue the options in the CP are not useful. The “on” setting shows all errors including trivial notices (which break the layout of the page) and the “off” setting hides everything.
NOTE - I found this function in libraries/Core.php
function _enable_debugging()
{
$this->EE->db->db_debug = TRUE;
error_reporting(E_ALL);
@ini_set('display_errors', 1);
}I tried changing the ‘display_errors’ setting to @ini_set(‘display_errors’, 0) - but this had no effect.
Thanks!