Fix NULL placeholders in log entries

Created on 26 October 2024, about 2 months ago

I just discovered that if you pass NULL as the value to a placeholder in a log entry, this will blow up when using dblog and visiting the “Recent log messages” page with the following error:
TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in core/lib/Drupal/Component/Render/FormattableMarkup.php on line 238 in Drupal\Component\Utility\Html::escape() (line 431 of core/lib/Drupal/Component/Utility/Html.php).
Apparently those are handled fine by t(), but not by teh dblog module.

🐛 Bug report
Status

Active

Version

1.0

Component

General code

Created by

🇦🇹Austria drunken monkey Vienna, Austria

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024