From 045ebd2f8e258c425c2a40d9e97c44f800bdbd68 Mon Sep 17 00:00:00 2001 From: Eduardo Gulias Davis Date: Thu, 8 May 2014 18:26:53 +0200 Subject: [PATCH] Refactor of domain exceptions --- src/Egulias/EmailValidator/EmailParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Egulias/EmailValidator/EmailParser.php b/src/Egulias/EmailValidator/EmailParser.php index de13f6a..898eeba 100644 --- a/src/Egulias/EmailValidator/EmailParser.php +++ b/src/Egulias/EmailValidator/EmailParser.php @@ -314,7 +314,7 @@ class EmailParser } $this->checkConsecutiveDots(); - $this->checkDomainPartExceptions(); + $this->checkDomainPartExceptions($prev); if ($this->hasBrackets()) { $this->parseDomainLiteral(); @@ -490,7 +490,7 @@ class EmailParser return true; } - private function checkDomainPartExceptions() + private function checkDomainPartExceptions($prev) { if ($this->lexer->token['type'] === EmailLexer::S_AT) { throw new \InvalidArgumentException('ERR_CONSECUTIVEATS');