[wp-trac] [WordPress Trac] #44052: Missing parameter type for `login_header()`

WordPress Trac noreply at wordpress.org
Wed Jun 6 22:24:37 UTC 2018


#44052: Missing parameter type for `login_header()`
----------------------------------------+---------------------
 Reporter:  desrosj                     |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.9.7
Component:  Login and Registration      |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:  docs
----------------------------------------+---------------------
Changes (by flixos90):

 * keywords:  good-first-bug has-patch => good-first-bug needs-patch
 * milestone:  4.9.8 => 4.9.7


Comment:

 I think it makes more sense to leave the third parameter as a `WP_Error`
 only, but set its default value to `null`, which is the expected default
 value for optional object parameters. Since we create a new `WP_Error` if
 none is passed, we could adjust the documentation as follows: "Optional.
 The error to pass. Default is a new empty error."

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


More information about the wp-trac mailing list