Skip to content

Commit 567cb21

Browse files
Merge pull request #57457 from nextcloud/backport/57454/stable32
[stable32] fix(session): handle null logger
2 parents ee4ddc6 + 2dcf6ad commit 567cb21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/private/Session/Internal.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use OCP\Session\Exceptions\SessionNotAvailableException;
1616
use Psr\Log\LoggerInterface;
1717
use function call_user_func_array;
18+
use function OCP\Log\logger;
1819

1920
/**
2021
* Class Internal
@@ -194,7 +195,7 @@ public function trapError(int $errorNumber, string $errorString) {
194195
private function invoke(string $functionName, array $parameters = [], bool $silence = false) {
195196
try {
196197
return $this->monitorAndLog(
197-
$this->logger,
198+
$this->logger ?? logger('core'),
198199
$functionName,
199200
function () use ($silence, $functionName, $parameters) {
200201
if ($silence) {

0 commit comments

Comments
 (0)