[wp-trac] [WordPress Trac] #42399: $error variable in login action is probably undefined all the time

WordPress Trac noreply at wordpress.org
Wed Nov 1 17:57:58 UTC 2017


#42399: $error variable in login action is probably undefined all the time
------------------------------------+-----------------------------
 Reporter:  nextendweb              |      Owner:
     Type:  defect (bug)            |     Status:  new
 Priority:  normal                  |  Milestone:  Awaiting Review
Component:  Login and Registration  |    Version:  trunk
 Severity:  normal                  |   Keywords:
  Focuses:                          |
------------------------------------+-----------------------------
 In wp-login.php in the following code, the $error variable probably always
 evaluated as false as there is no global $error; anywhere. Is the code ok
 or it does not required anymore?

 {{{#!php
 <?php
 /**
  * Filters whether to print the call to `wp_attempt_focus()` on the login
 screen.
  *
  * @since 4.8.0
  *
  * @param bool $print Whether to print the function call. Default true.
  */
 if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { ?>
 wp_attempt_focus();
 <?php } ?>
 }}}

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


More information about the wp-trac mailing list