passing null to trim is deprecated in pet_send_one_mail()

Created on 13 March 2023, about 2 years ago
Updated 13 March 2024, about 1 year ago

Problem/Motivation

If $pet->getMailbodyPlain() returns null for some reason, then PHP gives a warning like this:

Deprecated function: trim(): Passing null to parameter #1 ($string) is deprecated in pet_send_one_mail() (line 241 of [path]/pet/pet.module

Steps to reproduce

I'm not sure.

Proposed resolution

Test that $mail_body_plain is !empty before running trim() on it.

Remaining tasks

make a patch.

πŸ› Bug report
Status

Fixed

Version

4.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

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

Comments & Activities

Production build 0.71.5 2024