[wp-trac] [WordPress Trac] #31839: Setting error reporting level for wp_debug_mode

WordPress Trac noreply at wordpress.org
Thu Feb 13 17:21:04 UTC 2025


#31839: Setting error reporting level for wp_debug_mode
----------------------------+---------------------
 Reporter:  aifrim          |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:
Component:  Bootstrap/Load  |     Version:  4.1.1
 Severity:  normal          |  Resolution:
 Keywords:  dev-feedback    |     Focuses:
----------------------------+---------------------

Comment (by jorbin):

 If you call `error_reporting` with something besides an int in php8.0+,
 you will get a fatal warning.  See: https://3v4l.org/ZGavA

 I think this is going to require some inline documentation updates and
 likely a make/core post to help with visibility because I can absolutely
 see a user putting `define( 'WP_DEBUG_LEVEL', 'E_ALL & ~E_NOTICE &
 ~E_STRICT & ~E_DEPRECATED' );` instead of `define( 'WP_DEBUG_LEVEL', E_ALL
 & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED );

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


More information about the wp-trac mailing list