fix(session): handle null logger

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
This commit is contained in:
Christoph Wurst 2026-01-09 16:42:39 +01:00
parent acb3e68a93
commit 7e188433a1
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8

View file

@ -15,6 +15,7 @@ use OCP\Authentication\Exceptions\InvalidTokenException;
use OCP\Session\Exceptions\SessionNotAvailableException;
use Psr\Log\LoggerInterface;
use function call_user_func_array;
use function OCP\Log\logger;
/**
* Class Internal
@ -194,7 +195,7 @@ class Internal extends Session {
private function invoke(string $functionName, array $parameters = [], bool $silence = false) {
try {
return $this->monitorAndLog(
$this->logger,
$this->logger ?? logger('core'),
$functionName,
function () use ($silence, $functionName, $parameters) {
if ($silence) {