fix(Log): revert swich to ?? operator

false is expected, not null. The changed caused "user" in the log files
to be false instead of "--", which is breaking behaviour.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/52252/head
Arthur Schiwon 1 year ago
parent dc8e16c520
commit fe52a03ff8
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
  1. 2
      lib/private/Log/LogDetails.php

@ -37,7 +37,7 @@ abstract class LogDetails {
$url = ($request->getRequestUri() !== '') ? $request->getRequestUri() : '--';
$method = is_string($request->getMethod()) ? $request->getMethod() : '--';
if ($this->config->getValue('installed', false)) {
$user = \OC_User::getUser() ?? '--';
$user = \OC_User::getUser() ?: '--';
} else {
$user = '--';
}

Loading…
Cancel
Save