Make WordPress Core

Opened 9 years ago

Closed 5 years ago

#41902 closed enhancement (fixed)

wp-load.php: comment for error reporting levels

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

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 9 years ago.
41902_2.patch (620 bytes ) - added by sasagar 8 years ago.
added the

Download all attachments as: .zip

Change History (9)

@sasagar
9 years ago

#1 @SergeyBiryukov
9 years ago

  • Component CommentsBootstrap/Load

#2 follow-up: @schlessera
9 years ago

  • Severity normaltrivial

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:

<?php
/*
 * 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 );
Version 0, edited 9 years ago by schlessera (next)

#3 in reply to: ↑ 2 @sasagar
9 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
8 years ago

added the

#4 @sasagar
8 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
8 years ago

  • Description modified (diff)
  • Keywords has-patch commit added
  • Owner set to schlessera
  • Status newaccepted

#6 @jorbin
5 years ago

  • Milestone Awaiting Review5.8

#7 @jorbin
5 years ago

  • Resolutionfixed
  • Status acceptedclosed

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.