Problem/Motivation

If you set an exclude with an email address that is not assigned to an existing user, you will get the error:

Error: Call to a member function getPreferredLangcode() on bool
in Drupal\exception_mailer\Logger\ErrorLog->log() (line 158 of
/var/www/html/web/modules/contrib/exception_mailer/src/Logger/ErrorLog.php)

Steps to reproduce

Set an exclude and add a mail address that is not assigned to an existing user.
Generate an error/exception.
You will get the mentioned error.

Proposed resolution

Set the user's preferred language only if the user has been successfully loaded based on email

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

szato created an issue. See original summary.

szato’s picture

Status: Active » Needs review

Kosa Ilma made their first commit to this issue’s fork.

Kosa Ilma credited lexhouk.

kosa ilma’s picture

kosa ilma’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.