[wp-trac] [WordPress Trac] #36561: Deprecated notices should be classified as such.

WordPress Trac noreply at wordpress.org
Wed Aug 2 21:24:24 UTC 2017


#36561: Deprecated notices should be classified as such.
-------------------------+------------------
 Reporter:  jrf          |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.9
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------

Comment (by jrf):

 Just realized a minor issue with this patch. There are a couple of places
 in core where `error_reporting()` is called like so:
 {{{#!php
 <?php
 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 );
 }}}

 These calls do not include the PHP 5.3 `E_DEPRECATED` and
 `E_USER_DEPRECATED` and at least two of these calls are made before the
 `wp-includes/compat.php` file is loaded.

 These are the places where I found the troublesome `error_reporting()`
 calls:
 * https://core.trac.wordpress.org/browser/trunk/src/wp-load.php#L24
 (before compat file is loaded)
 * https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/load.php#L333 (called from wp-settings.php before compat file is
 loaded)
 * https://core.trac.wordpress.org/browser/trunk/src/wp-
 admin/plugins.php#L159
 * https://core.trac.wordpress.org/browser/trunk/src/wp-
 admin/update.php#L87

 Anyone got any bright ideas how to handle this ? Or should the backfill
 define(s) for the PHP 5.3 error constants just be moved to the top of the
 `wp-load.php` file and the above four calls adjusted to include them ?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36561#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list