From b6bb28eec7dc5dc680eefa2d6d35fc68059519ac Mon Sep 17 00:00:00 2001 From: Sascha Grossenbacher <5019-berdir@users.noreply.drupalcode.org> Date: Sun, 24 Nov 2024 15:53:35 +0000 Subject: [PATCH] Issue #3222203 by baikho, jonhai, berdir: LogEntry causes erroneous records in "locales_source" table --- src/Logger/LogEntry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Logger/LogEntry.php b/src/Logger/LogEntry.php index ca56589..3919ec0 100644 --- a/src/Logger/LogEntry.php +++ b/src/Logger/LogEntry.php @@ -111,8 +111,8 @@ class LogEntry { */ public function log($message, $variables = array(), $level = RfcLogLevel::NOTICE) { - if ($variables !== NULL && gettype($message) === 'string') { - $message = t($message, $variables); + if (!empty($variables) && gettype($message) === 'string') { + $message = new FormattableMarkup($message, $variables); } if (!empty($this->message)) { -- GitLab