Enable display_errors if WP_DEBUG is true
|Reported by:||sivel||Owned by:|
Often enough when users enable WP_DEBUG they still do not get any good information because most hosts have display_errors set to Off and some times do not have access to the error logs.
Enabling display_errors when WP_DEBUG is true would make troubleshooting much easier.
We can add a constant for disabling display_errors for those people that would rather just have the errors sent to the globally defined error log file.
In addition we will add another constant to enable logging to a log file called debug.log.
- WP_DEBUG_DISPLAY - If not defined or defined as true it will set display_errors to On. If set to false it will set display_errors to Off. This sets the default behavior with WP_DEBUG to display errors.
- WP_DEBUG_LOG - If defined and set to true this will log to a file in ABSPATH called debug.log. Set to false or do not define to disable logging to this file.
The above constants will only take effect if WP_DEBUG is defined and set to true.