[wp-trac] [WordPress Trac] #48693: Silence ini_set caused error or check if function_exists first

WordPress Trac noreply at wordpress.org
Mon Nov 18 09:01:41 UTC 2019


#48693: Silence ini_set caused error or check if function_exists first
--------------------------+--------------------------------------
 Reporter:  drazon        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.3
 Severity:  normal        |   Keywords:  needs-patch dev-feedback
  Focuses:                |
--------------------------+--------------------------------------
 https://core.trac.wordpress.org/browser/tags/5.3/src/wp-
 includes/load.php#L352

 should be either

 {{{#!php
 <?php
 @ini_set( 'display_errors', 0 );
 }}}


 to silence the error

 or

 {{{#!php
 <?php
 if ( function_exists( 'ini_set' ) ) {
 ini_set( 'display_errors', 0 );
 }

 }}}

 for the same reason as
 https://core.trac.wordpress.org/browser/tags/5.3/src/wp-admin/includes
 /class-wp-debug-data.php#L627

 The same login could be applied to other ini_set lines in the
 wp_debug_mode() function

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48693>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list