Merge pull request #57454 from nextcloud/fix/session/handle-null-logger

fix(session): handle null logger
This commit is contained in:
Robin Appelman 2026-01-09 17:51:04 +01:00 committed by GitHub
commit 328a4608aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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) {