improvement of userAgent variable assigment

Signed-off-by: Roger Szabo <roger.szabo@web.de>
This commit is contained in:
Roger Szabo 2017-03-10 17:20:19 +08:00
parent 06a8ac6ff6
commit 38d8492f30

View file

@ -101,7 +101,7 @@ class File {
} else {
$user = '--';
}
$userAgent = ($request->getHeader('User-Agent') !== '') ? $request->getHeader('User-Agent') : '--';
$userAgent = $request->getHeader('User-Agent') ?: '--';
$version = $config->getValue('version', '');
$entry = compact(
'reqId',