Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#24325 closed enhancement (wontfix)

[wp-includes/load.php] LINE 270: ini_set should be verify before call

Reported by: teo.cojo Owned by: nacin
Milestone: Priority: normal
Severity: minor Version:
Component: General Keywords:
Focuses: Cc:


Block @2 should be encapsulate in @1 if.

Most of hosting disable ini_set function and this will resolve some users frustration about multiple junk line of logs or error display.

This is my first report, so I apologize if something is wrong.


if (function_exists('ini_set')) {
 @2 CODE


   ini_set( 'display_errors', 1 );
elseif ( null !== WP_DEBUG_DISPLAY )
   ini_set( 'display_errors', 0 );

if ( WP_DEBUG_LOG ) {
   ini_set( 'log_errors', 1 );
   ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );

Change History (3)

#1 @SergeyBiryukov
8 years ago

  • Keywords has-patch removed

Looks like most of other instances in core use error suppression: @ini_set(...).

Not sure if that would make sense here though. These are the ones that only run with WP_DEBUG on, so if ini_set() is disabled, hiding that fact would make debugging harder.

#2 @nacin
8 years ago

  • Owner set to nacin
  • Status changed from new to reviewing

I agree with Sergey here — we shouldn't hide these errors because they are within debugging blocks.

#3 @nacin
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

Meant to close this.

Note: See TracTickets for help on using tickets.