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

WordPress Trac noreply at wordpress.org
Fri May 11 18:18:56 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                  |   Keywords:  good-first-bug
  Focuses:  docs                    |
------------------------------------+----------------------------
 The `login_header()` function's third parameter is optional and accepts a
 `WP_Error` instance. The default value, though is a string, which is
 missing from the inline documentation.

 To prevent someone from passing a string (which would not be added to a
 new `WP_Error`), `if ( empty( $wp_error ) ) {}` could be changed to `if (
 ! is_wp_error( $wp_error ) ) {}`.

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


More information about the wp-trac mailing list