Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 9 years ago

#24325 closed enhancement (wontfix)

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

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

Description

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.

@1

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

@2

if ( WP_DEBUG_DISPLAY )
   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
11 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
10 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
10 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.