Fatal error in login_form_middle hook
-
In?
templates/login-form.php:70
?you have this:apply_filters( 'login_form_middle', '', '' );
This produces a fatal error. The second argument of the filter must be an array, not?
''
.The description of the filter in the
wp-includes/general-template.php:571
, looks as following:/**
* Filters content to display in the middle of the login form.
*
* The filter evaluates just following the location where the 'login-password'
* field is displayed.
*
* @since 3.0.0
*
* @param string $content Content to display. Default empty.
* @param array $args Array of login form arguments.
*/
$login_form_middle = apply_filters( 'login_form_middle', '', $args );$args
must be an array, not string. As a result, hooks trying to process the filter fail with a fatal error. Here is an example.public function add_signature( $content, array $args ): string {
Could you please change the line ?
templates/login-form.php:70
to the following?apply_filters( 'login_form_middle', '', [] );
Thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.