Error: Call to a member function getPreferredLangcode() on bool

Created on 5 December 2023, 7 months ago
Updated 14 December 2023, 7 months ago

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

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary szato

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024