[wp-trac] [WordPress Trac] #50019: remove_meta_box triggers warning in PHP 7.4

WordPress Trac noreply at wordpress.org
Sat May 9 12:23:03 UTC 2020


#50019: remove_meta_box triggers warning in PHP 7.4
----------------------------+---------------------
 Reporter:  coolmann        |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  5.5
Component:  Administration  |     Version:  5.4
 Severity:  major           |  Resolution:
 Keywords:  has-patch       |     Focuses:  ui
----------------------------+---------------------
Changes (by SergeyBiryukov):

 * component:  Posts, Post Types => Administration


Comment:

 Thanks for the patch!

 Some findings from my testing:
 * The issue can only be reproduced if you've previously manually reordered
 the meta boxes in your own way, and the preference is saved in the `meta-
 box-order_$page` user option.
 * If that's the case, `do_meta_boxes()` [source:tags/5.4/src/wp-
 admin/includes/template.php?marks=1249-1260#L1243 pulls the boxes out of
 their previous priority] into the one the user chose, calling
 `add_meta_box()` with the `sorted` priority. This was added in [8682].
 * There is some logic in `add_meta_box()` to skip previously removed
 boxes. This was added earlier in [7930], and it only applies to the `core`
 priority. This is where the issue is, it should also apply to the `sorted`
 priority.

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


More information about the wp-trac mailing list