Configuration causes phpmailer to throw a deprecation warning in php 8.1

Created on 15 December 2023, about 1 year ago
Updated 13 February 2024, 10 months ago

Problem/Motivation

In the default configuration for the module, it seems that 'SMTP timeout' is set to null. When a message is sent, this causes null to be passed into php's stream_set_timeout() function, which is a deprecated use in PHP 8.1.

Steps to reproduce

Create an instance of Drupal 10 in php 8.1 with this module installed. configure it with a blank field for 'SMTP timeout'. The warning should occur on any email sent, but I found it when trying to use the contact form built in to drupal.

Proposed resolution

Either disallow setting an empty field for 'SMTP timeout' or use the default value when an empty field is set.

I'm happy to create a pull request for this issue if desired.

🐛 Bug report
Status

Fixed

Version

2.2

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024