Mercurial > hg > cmmr2012-drupal-site
diff core/modules/dblog/src/Logger/DbLog.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/core/modules/dblog/src/Logger/DbLog.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/modules/dblog/src/Logger/DbLog.php Thu Feb 28 13:11:55 2019 +0000 @@ -2,7 +2,6 @@ namespace Drupal\dblog\Logger; -use Drupal\Component\Utility\Unicode; use Drupal\Core\Database\Connection; use Drupal\Core\Database\Database; use Drupal\Core\Database\DatabaseException; @@ -57,8 +56,8 @@ // Remove any backtraces since they may contain an unserializable variable. unset($context['backtrace']); - // Convert PSR3-style messages to SafeMarkup::format() style, so they can be - // translated too in runtime. + // Convert PSR3-style messages to \Drupal\Component\Render\FormattableMarkup + // style, so they can be translated too in runtime. $message_placeholders = $this->parser->parseMessagePlaceholders($message, $context); try { @@ -66,14 +65,14 @@ ->insert('watchdog') ->fields([ 'uid' => $context['uid'], - 'type' => Unicode::substr($context['channel'], 0, 64), + 'type' => mb_substr($context['channel'], 0, 64), 'message' => $message, 'variables' => serialize($message_placeholders), 'severity' => $level, 'link' => $context['link'], 'location' => $context['request_uri'], 'referer' => $context['referer'], - 'hostname' => Unicode::substr($context['ip'], 0, 128), + 'hostname' => mb_substr($context['ip'], 0, 128), 'timestamp' => $context['timestamp'], ]) ->execute();