• Resolved kaggdesign

    (@kaggdesign)


    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.

    • This topic was modified 2 months, 3 weeks ago by kaggdesign.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @kaggdesign,

    Thank you for pointing out this issue and providing detailed feedback. I’ve noted your suggestion and will discuss it with our development team.

    Could you please share the PHP version and the web server you are currently using? This information will help us.

    We appreciate your time and effort in bringing this to our attention.

    Thread Starter kaggdesign

    (@kaggdesign)

    The bug exists in any PHP version, starting from 5.1+, when it became possible to declare a parameter with type array.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.