Html::escape(): Argument #1 ($text) must be of type string, null given

Created on 29 December 2024, 5 days ago

Problem/Motivation

When rendering a page with an image whose file doesn't exist anymore, using the latest version of Bunny Optimizer and Drupal 11, an error message is logged with an argument with a null value. This breaks admin/reports/dblog with the following error:

Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in [..]/web/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 238

Proposed resolution

Don't log messages with arguments with null values.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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