Make WordPress Core

Opened 7 years ago

Closed 4 years ago

#41902 closed enhancement (fixed)

wp-load.php: comment for error reporting levels

Reported by: sasagar's profile sasagar Owned by: schlessera's profile schlessera
Milestone: 5.8 Priority: normal
Severity: trivial Version: 0.71
Component: Bootstrap/Load Keywords: has-patch commit
Focuses: docs Cc:

Description (last modified by schlessera)

Yes, looks good to me.

I think this can just be committed, not much to break here.

Attachments (2)

41902.patch (426 bytes) - added by sasagar 7 years ago.
41902_2.patch (620 bytes) - added by sasagar 7 years ago.
added the

Download all attachments as: .zip

Change History (9)

@sasagar
7 years ago

#1 @SergeyBiryukov
7 years ago

  • Component changed from Comments to Bootstrap/Load

#2 follow-up: @schlessera
7 years ago

  • Severity changed from normal to trivial

Thanks for the ticket and patch, @sasagar !

If we go ahead and add an additional comment, we should also make sure it provides added value as well.

How about something like this:

/*
 * Initialize error reporting to a known set of levels.
 * 
 * This will be adapted in wp-includes/load.php based on the WP_DEBUG setting.
 * @see http://php.net/manual/en/errorfunc.constants.php List of known error levels.
 */ 
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
Last edited 7 years ago by schlessera (previous) (diff)

#3 in reply to: ↑ 2 @sasagar
7 years ago

@schlessera

Thanks for suggesting!
Nice one isn't it!?

I agree to add your comment, this time!

This ticket was my first one at WordCamp Tokyo. So I'm not sure this was the good ticket.
I'm so happy to get any feedback!

Replying to schlessera:

Thanks for the ticket and patch, @sasagar !

If we go ahead and add an additional comment, we should also make sure it provides added value as well.

How about something like this:

/*
 * Initialize error reporting to a known set of levels.
 * 
 * This will be adapted in wp-includes/load.php based on the WP_DEBUG setting.
 * @see http://php.net/manual/en/errorfunc.constants.php List of known error levels.
 */ 
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );

@sasagar
7 years ago

added the

#4 @sasagar
7 years ago

@schlessera
Sorry for long time no see.

I changed the patch file as you suggested. (I couldn't type description completely. :( )

Would you check for that anytime you can.
I hope it would work.

#5 @schlessera
7 years ago

  • Description modified (diff)
  • Keywords has-patch commit added
  • Owner set to schlessera
  • Status changed from new to accepted

#6 @jorbin
4 years ago

  • Milestone changed from Awaiting Review to 5.8

#7 @jorbin
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 50914:

Bootstrap/Load: Improve docs for error reporting

Make it clearer that wp_debug_mode will change this based on the WP_DEBUG constant and also make it clearer where this list comes from.

Props sasagar, schlessera, jorbin.
Fixes #41902.

Note: See TracTickets for help on using tickets.