mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-01 13:08:58 +00:00
Fix "Trying to access array offset on value of type null" (#228)
Added a check that `$previous` is not null (i.e. previous token exists)
This commit is contained in:
@@ -170,7 +170,7 @@ abstract class Parser
|
||||
{
|
||||
$previous = $this->lexer->getPrevious();
|
||||
|
||||
if ($previous['type'] === EmailLexer::S_BACKSLASH
|
||||
if ($previous && $previous['type'] === EmailLexer::S_BACKSLASH
|
||||
&&
|
||||
$this->lexer->token['type'] !== EmailLexer::GENERIC
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user