From 38d8492f30fa6e8e530711986042487c6310360b Mon Sep 17 00:00:00 2001 From: Roger Szabo Date: Fri, 10 Mar 2017 17:20:19 +0800 Subject: improvement of userAgent variable assigment Signed-off-by: Roger Szabo --- lib/private/Log/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index b1acd0175c5..0c30d2f1c00 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -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', -- cgit v1.2.3