Multisite mails: Initialize `$current_user` before accessing `$current_user->user_login`.

props Toro_Unit.
see #31217.
fixes #33254.
Built from https://develop.svn.wordpress.org/trunk@33569


git-svn-id: http://core.svn.wordpress.org/trunk@33536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-08-04 11:39:25 +00:00
parent 55a4ce4db2
commit 198cdb1dde
2 changed files with 2 additions and 1 deletions

View File

@ -298,6 +298,7 @@ All at ###SITENAME###
*/ */
$content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email );
$current_user = wp_get_current_user();
$content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
$content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content );
$content = str_replace( '###EMAIL###', $value, $content ); $content = str_replace( '###EMAIL###', $value, $content );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-RC1-33563'; $wp_version = '4.3-RC1-33569';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.