Skip to content

Commit 25f4ce1

Browse files
authored
Catch null email addresses in PunycodeHelper (#41011)
1 parent a035c2c commit 25f4ce1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libraries/src/String/PunycodeHelper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ public static function urlToUTF8($uri)
195195
*/
196196
public static function emailToPunycode($email)
197197
{
198+
if ($email === null) {
199+
@trigger_error(sprintf('Passing null value is deprecated in %s and will throw an exception in 6.0.', __METHOD__), E_USER_DEPRECATED);
200+
return '';
201+
}
202+
198203
$explodedAddress = explode('@', $email);
199204

200205
// Not addressing UTF-8 user names

0 commit comments

Comments
 (0)