When converting emoji in email to static images, check that the message is defined, otherwise we could cause PHP warnings.

Props nerrad.

Fixes #31708.




git-svn-id: https://develop.svn.wordpress.org/trunk@31847 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-03-20 12:31:30 +00:00
parent bb2ddebec9
commit e3b2637699
1 changed files with 3 additions and 1 deletions

View File

@ -4199,6 +4199,8 @@ function wp_staticize_emoji( $text ) {
* @return array The email data array, with emoji in the message staticized.
*/
function _wp_staticize_emoji_for_email( $mail ) {
$mail['message'] = wp_staticize_emoji( $mail['message'], true );
if ( isset( $mail['message'] ) ) {
$mail['message'] = wp_staticize_emoji( $mail['message'], true );
}
return $mail;
}