[wp-trac] [WordPress Trac] #51073: Extra padding below the admin bar

WordPress Trac noreply at wordpress.org
Fri Aug 21 14:06:34 UTC 2020


#51073: Extra padding below the admin bar
----------------------------+---------------------
 Reporter:  akissz          |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  5.5.1
Component:  Administration  |     Version:  5.5
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+---------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-testing => has-patch


Comment:

 In [attachment:"51073.diff"], only add the class if:
 * The error is not a notice, as notices are not displayed with the
 `error_reporting` level [source:tags/5.5/src/wp-load.php?marks=24#L19 set
 in wp-load.php].
 * AND the error is not in `wp-config.php`, as it's the only user-editable
 file loaded before `wp_debug_mode()` runs.

 This still can result in the extra padding on some environments, e.g. if
 `wp-config.php` sets `error_reporting` to not display warnings and there
 is a warning later in the file, but the chances of that are reduced
 significantly.

 In a future release, we could try something like:
 * Saving the value of `error_reporting()` before it's affected by
 `wp_debug_mode()`.
 * Using that to only print the class if we determine that the error was
 displayed according to that setting.

 But that seems more complicated, and I think [attachment:"51073.diff"]
 would be good enough for 5.5.1.

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


More information about the wp-trac mailing list