diff core/lib/Drupal/Core/Logger/LoggerChannel.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Logger/LoggerChannel.php	Thu Feb 28 13:11:55 2019 +0000
+++ b/core/lib/Drupal/Core/Logger/LoggerChannel.php	Thu May 09 15:34:47 2019 +0100
@@ -101,7 +101,6 @@
     $context += [
       'channel' => $this->channel,
       'link' => '',
-      'user' => NULL,
       'uid' => 0,
       'request_uri' => '',
       'referer' => '',
@@ -113,17 +112,9 @@
       $context['request_uri'] = $request->getUri();
       $context['referer'] = $request->headers->get('Referer', '');
       $context['ip'] = $request->getClientIP();
-      try {
-        if ($this->currentUser) {
-          $context['user'] = $this->currentUser;
-          $context['uid'] = $this->currentUser->id();
-        }
-      }
-      catch (\Exception $e) {
-        // An exception might be thrown if the database connection is not
-        // available or due to another unexpected reason. It is more important
-        // to log the error that we already have so any additional exceptions
-        // are ignored.
+
+      if ($this->currentUser) {
+        $context['uid'] = $this->currentUser->id();
       }
     }