Support » Plugin: Passwordless Login » Replace `create_function()` with a closure for PHP 7.2 compabitility

  • lucasbustamante

    (@lucasbustamante)


    Can you please update the plugin to remove a call to create_function on line 256? It was deprecated on PHP 7.2.0 and I can’t use the plugin: https://www.php.net/manual/pt_BR/function.create-function.php

    On line 256, replace:

    
    add_filter('wp_mail_content_type', create_function('', 'return "text/html";'));
    

    With:

    
    add_filter('wp_mail_content_type', function() {
        return "text/html";
    });
    

    Since WordPress now requires 5.6 it is completely fine to use Closures.

    Thanks

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