New user notification doesn’t include activation link

When adding new users through the Dashboard, I’ve noticed that the notification email sent to a user when then have been added to WordPress doesn’t work correctly. Included in the email is the following line, however you’ll notice that the registration key is missing and the link is not rendered properly.

To set your password, visit the following address: 

I did some digging around, outputting the contents of wp_mail like so:

    add_filter('wp_mail', function($  email) {         var_dump($  email);         return $  email;     }, 1); 

And seeing this for the new user notification email:

array(5) {   ["to"]=>   string(20) ""   ["subject"]=>   string(47) "[My Great Blog] Your username and password info"   ["message"]=>   string(224) "Username: test19  To set your password, visit the following address:  <> "   ["headers"]=>   string(0) ""   ["attachments"]=>   array(0) {   } } 

What’s weird is that it sort of includes a correct link, but the HTML is malformed (no A href=””), and it’s missing the closing . I have confirmed this on WordPress Trac.

Anyone have any insight onto why this is not working, seems like such a crucial part of a website.

Version 4.9.8.

Already set ‘wp_mail_content_type’ to text/html’.