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

WordPress Trac noreply at wordpress.org
Tue Jul 17 07:03:54 UTC 2018


#44591: PHP notice if optional argument isn't passed to map_meta_cap()
--------------------------+-----------------------------
 Reporter:  henry.wright  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 {{{map_meta_cap()}}} can take an optional 3rd argument.
 {{{func_get_args()}}} is used in the function definition to get that
 argument. The argument is used later on in the function definition. For
 example {{{$args[0]}}}

 If a third argument isn't passed to {{{map_meta_cap()}}}, we will get an
 undefined offset notice in our debug log pointing to {{{$args[0]}}}.

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


More information about the wp-trac mailing list