Skip to content

Commit

Permalink
Merge pull request #41425 from nextcloud/backport/41406/stable26
Browse files Browse the repository at this point in the history
[stable26] fix(log): Log exception class when message is empty
  • Loading branch information
solracsf committed Nov 13, 2023
2 parents 8dd9edc + 31ba65f commit 496a68d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Log.php
Expand Up @@ -338,7 +338,7 @@ public function logException(Throwable $exception, array $context = []) {
unset($data['app']);
unset($data['level']);
$data = array_merge($serializer->serializeException($exception), $data);
$data = $this->interpolateMessage($data, $context['message'] ?? '--', 'CustomMessage');
$data = $this->interpolateMessage($data, isset($context['message']) && $context['message'] !== '' ? $context['message'] : ('Exception thrown: ' . get_class($exception)), 'CustomMessage');


array_walk($context, [$this->normalizer, 'format']);
Expand Down

0 comments on commit 496a68d

Please sign in to comment.