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

Created on 3 February 2022, over 2 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.69.0 2024