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

WordPress Trac noreply at wordpress.org
Sat Oct 10 17:32:36 UTC 2020


#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.6
Component:  Users         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by henry.wright):

 I disagree with `_doing_it_wrong`. My reasoning is the argument is
 **optional**. Optional indicates the function should be callable without
 passing a third argument

 I agree though, a type of guard is necessary

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


More information about the wp-trac mailing list