From e3b26376991795e9206bb580ca45d17ff7a03b21 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 20 Mar 2015 12:31:30 +0000 Subject: [PATCH] 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 --- src/wp-includes/formatting.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 6a259069d1..a75af2ee99 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -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; }