[wp-trac] [WordPress Trac] #44591: PHP notice if optional argument isn't passed to map_meta_cap()

WordPress Trac noreply at wordpress.org
Thu Feb 18 15:53:29 UTC 2021


#44591: PHP notice if optional argument isn't passed to map_meta_cap()
-------------------------------------+-----------------------------
 Reporter:  henry.wright             |       Owner:  SergeyBiryukov
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  5.8
Component:  Users                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:
-------------------------------------+-----------------------------

Comment (by johnbillion):

 This really isn't a bug that anybody should be experiencing often, let
 alone over a period of years. If you are, then the third party code in
 question needs to be fixed because this is not a bug in WordPress but a
 bug in the code that's performing a capability check without all the
 required parameters.

 I agree that triggering a `_doing_it_wrong()` in this situation will make
 it clearer to the developer what the problem is, but the third party code
 that triggers the problem still needs to be fixed.

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


More information about the wp-trac mailing list