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

WordPress Trac noreply at wordpress.org
Fri Feb 14 18:52:44 UTC 2025


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

 * owner:  (none) => pbearne
 * status:  new => assigned


Comment:

 Replying to [comment:11 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 );

 We need to sanitize the value set I will update the patch to do that

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


More information about the wp-trac mailing list