Problem/Motivation

PHP Warning: Attempt to read property "language" on null in logging_alerts/emaillog/emaillog.module on line 152
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Attempt to read property "language" on null in logging_alerts/emaillog/emaillog.module,
line 152

Steps to reproduce

drush up with PHP 8 deprecation warnings from other modules and enable emaillog.

Proposed resolution

The expected argument for drupal_mail is a language object, not a string anyway, use the default as other code in core does.

Example:

modules/contact/contact.pages.inc:152

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3316416-2.patch565 bytesjoelpittet

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new565 bytes

Here's a fix from the proposed solution.

poker10’s picture

Status: Needs review » Reviewed & tested by the community

I think this looks good and fixes the problem. Thanks!

  • poker10 committed ced66a23 on 7.x-2.x authored by joelpittet
    Issue #3316416 by joelpittet: PHP Warning:  Attempt to read property "...
poker10’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed this, thanks!

Status: Fixed » Closed (fixed)

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