[wp-trac] [WordPress Trac] #18391: Expand WP_DEBUG_LOG and make WP_DEBUG_DISPLAY work as expected

WordPress Trac noreply at wordpress.org
Tue Apr 17 00:36:36 UTC 2018


#18391: Expand WP_DEBUG_LOG and make WP_DEBUG_DISPLAY work as expected
------------------------------+-----------------------------
 Reporter:  nacin             |       Owner:  SergeyBiryukov
     Type:  enhancement       |      Status:  reviewing
 Priority:  normal            |   Milestone:  5.0
Component:  Bootstrap/Load    |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch => has-patch commit


Comment:

 `validate_file()` cannot be used here, as `wp_debug_mode()` is called
 before `wp-includes/functions.php` is included. We could duplicate its
 checks here, but I wonder how useful they are in this context. If someone
 has access to define `WP_DEBUG_LOG`, they could as well set `error_log`
 directly.

 `is_writeable()` check cannot be used either, as it requires the file to
 exist, but it may not be created yet.

 [attachment:18391.3.diff] is my take on the patch.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/18391#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list