The usage of var_export can cause circular reference and memory leak on internal logic

Created on 3 February 2022, almost 3 years ago
Updated 1 March 2023, over 1 year ago

Problem/Motivation

The usage of var_export does not allow circular references. If any class for internal logics is added to $message the rerouting will result in a memory leak.

Steps to reproduce

Add a class, for instance TranslatableMarkup to an array key of $message (e.g. $message['body'][]. The key $message['subject'] however has a workaround.

Proposed resolution

Use another serialization method to log the $message array to Watchdog.

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇳🇱Netherlands absoludo

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024