From 862cec3ce47f6ff2456053d6026681f1cc442ecf Mon Sep 17 00:00:00 2001 From: Farhad Date: Thu, 23 Jun 2016 08:23:09 +0000 Subject: [PATCH 1/3] fixed a bug where empty $email was passed to idn_to_utf8 checked if $email is not empty before passing it to idn_to_utf8 --- src/EmailAddress.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/EmailAddress.php b/src/EmailAddress.php index 4ce2bd8ab..475462609 100644 --- a/src/EmailAddress.php +++ b/src/EmailAddress.php @@ -547,6 +547,9 @@ protected function idnToAscii($email) */ protected function idnToUtf8($email) { + if(strlen($email) == 0) + return $email; + if (extension_loaded('intl')) { // The documentation does not clarify what kind of failure // can happen in idn_to_utf8. One can assume if the source From ab625c947d0df0d496d5d27f0d72c92175dc6fc6 Mon Sep 17 00:00:00 2001 From: Farhad Date: Thu, 23 Jun 2016 08:37:57 +0000 Subject: [PATCH 2/3] Update EmailAddress.php --- src/EmailAddress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EmailAddress.php b/src/EmailAddress.php index 475462609..10118a71b 100644 --- a/src/EmailAddress.php +++ b/src/EmailAddress.php @@ -547,7 +547,7 @@ protected function idnToAscii($email) */ protected function idnToUtf8($email) { - if(strlen($email) == 0) + if (strlen($email) == 0) return $email; if (extension_loaded('intl')) { From dcbb971da74a865fd3aa2f657512644284e5ff7f Mon Sep 17 00:00:00 2001 From: Farhad Date: Thu, 23 Jun 2016 08:49:49 +0000 Subject: [PATCH 3/3] Update EmailAddress.php --- src/EmailAddress.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EmailAddress.php b/src/EmailAddress.php index 10118a71b..9c36e918d 100644 --- a/src/EmailAddress.php +++ b/src/EmailAddress.php @@ -547,8 +547,9 @@ protected function idnToAscii($email) */ protected function idnToUtf8($email) { - if (strlen($email) == 0) + if (strlen($email) == 0) { return $email; + } if (extension_loaded('intl')) { // The documentation does not clarify what kind of failure