Swiftmailer will not send mails using advanced yii2

Sending mails, both with standard configuration in \common\config\main-local.php and using own code will throw out following exception of framework. Using mail function will not throw out any exceptions sending mail. How to fix this bug? I could go to file \vendor\Parser.php in order to check this exception, but is really yi22 responsible for this exception?
I’m using PHP 7.4

> object(yii\swiftmailer\Mailer)#270 (16) { ["messageClass"]=> string(23) "yii\swiftmailer\Message" +*
>  ["enableSwiftMailerLogging"]=> bool(false) ["_swiftMailer":"yii\swiftmailer\Mailer":private]=> NULL ["_transport":"yii\swiftmailer\Mailer":private]=> array(6) { ["class"]=> string(19) "Swift_SmtpTransport" ["host"]=> string(17) "mx2efc.netcup.net" ["username"]=> string(23) "kipp.thomas@tklustig.de" ["password"]=> string(9) "+++++++++" ["port"]=> int(465) ["encryption"]=> string(3) "ssl" } ["htmlLayout"]=> string(12) "layouts/html" ["textLayout"]=> string(12) "layouts/text" ["messageConfig"]=> array(0) { } ["useFileTransport"]=> bool(false) ["fileTransportPath"]=> string(13) "runtime/mail" ["fileTransportCallback"]=> NULL ["_view":"yii\mail\BaseMailer":private]=> array(0) { } ["_viewPath":"yii\mail\BaseMailer":private]=> string(82) "/var/www/vhosts/hosting157153.a2efa.netcup.net/httpdocs/Yii2_ErkanImmo/common/mail" ["_message":"yii\mail\BaseMailer":private]=> NULL ["_events":"yii\base\Component":private]=> array(0) { } ["_eventWildcards":"yii\base\Component":private]=> array(0) { } ["_behaviors":"yii\base\Component":private]=> NULL }
> 
# PHP Notice – [yii\base\ErrorException](http://www.yiiframework.com/doc-2.0/yii-base-errorexception.html)

## Trying to access array offset on value of type null

* 1. in /var/www/vhosts/hosting157153.a2efa.netcup.net/httpdocs/Yii2_ErkanImmo/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php

It’s hard to tell. You removed the number of the line in Parser in the trace so I don’t know where to look, I don’t know what threw the exception.

Oh, sorry, here is full exception:

# PHP Notice – [yii\base\ErrorException](http://www.yiiframework.com/doc-2.0/yii-base-errorexception.html)

## Trying to access array offset on value of type null

* 1. in /var/www/vhosts/hosting157153.a2efa.netcup.net/httpdocs/Yii2_ErkanImmo/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php at line 147

This code will throw out Exception:

if ($previous['type'] === EmailLexer::S_BACKSLAS &&  $this->lexer->token['type'] !== EmailLexer::GENERIC{
....
}

I could check this indizie with isset(), but curiously, this exception will not be thrown out using php 7.2. Just higher version will 'cause this error…

Hmm, which version of egulias/email-validator is that?

An old one. I just have updated framework using composer and will try again, as soon as possible…

All right now. After having updated Yii2, exception gotta fixed. As it seems, PHP>7.2 doesn’t accept non-existing indizies any more. This thread can be closed succesfully solved.