summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-17 11:42:31 +0100
committerGitHub <noreply@github.com>2018-01-17 11:42:31 +0100
commitc121610d5a42b8a30a328c0a2f9704fb20d4c369 (patch)
treefab73c631b184cb30229ece3995d536c9dce8707 /core/Controller
parent9222dcd9401717cf9335af5f5bc0ef3bf8f0b713 (diff)
parent4ef302c0be2047f78b1aa3976eba003a2c280f64 (diff)
downloadnextcloud-server-c121610d5a42b8a30a328c0a2f9704fb20d4c369.tar.gz
nextcloud-server-c121610d5a42b8a30a328c0a2f9704fb20d4c369.zip
Merge pull request #7813 from nextcloud/getHeader-should-only-return-string
Request->getHeader() should always return a string
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/ClientFlowLoginController.php2
-rw-r--r--core/Controller/CssController.php2
-rw-r--r--core/Controller/JsController.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index 0e7fbf892b6..23bd42a0f18 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -115,7 +115,7 @@ class ClientFlowLoginController extends Controller {
*/
private function getClientName() {
$userAgent = $this->request->getHeader('USER_AGENT');
- return $userAgent !== null ? $userAgent : 'unknown';
+ return $userAgent !== '' ? $userAgent : 'unknown';
}
/**
diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php
index 95a41f8dd15..43a4f453b0e 100644
--- a/core/Controller/CssController.php
+++ b/core/Controller/CssController.php
@@ -98,7 +98,7 @@ class CssController extends Controller {
private function getFile(ISimpleFolder $folder, $fileName, &$gzip) {
$encoding = $this->request->getHeader('Accept-Encoding');
- if ($encoding !== null && strpos($encoding, 'gzip') !== false) {
+ if (strpos($encoding, 'gzip') !== false) {
try {
$gzip = true;
return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz
diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php
index f02948e47a0..670ca997257 100644
--- a/core/Controller/JsController.php
+++ b/core/Controller/JsController.php
@@ -96,7 +96,7 @@ class JsController extends Controller {
private function getFile(ISimpleFolder $folder, $fileName, &$gzip) {
$encoding = $this->request->getHeader('Accept-Encoding');
- if ($encoding !== null && strpos($encoding, 'gzip') !== false) {
+ if (strpos($encoding, 'gzip') !== false) {
try {
$gzip = true;
return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz