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

WordPress Trac noreply at wordpress.org
Fri Jun 22 20:23:15 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 has-patch needs-refresh  |     Focuses:  docs
----------------------------------------------------+---------------------
Changes (by desrosj):

 * keywords:  good-first-bug has-patch 2nd-opinion => good-first-bug has-
     patch needs-refresh


Comment:

 None of the patches so far seem like a complete solution. The two main
 items here we should change to fix the original described problem:

 - The default for `$wp_error` should be changed to `null` to properly
 reflect the functions documentation. The `@param` tag description should
 also be changed to "Optional. The error to pass. Default is a new empty
 error."
 - The `if ( empty( $wp_error ) )` conditional should be changed to check
 `! is_wp_error( $wp_error )` to ensure any passed value other than an
 instance of `WP_Error` is turned into one.

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


More information about the wp-trac mailing list