diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-12 14:15:12 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-17 09:51:31 +0100 |
commit | 4ef302c0be2047f78b1aa3976eba003a2c280f64 (patch) | |
tree | 51b5c301126eebc6d6db91095e8cc7f2166b3324 /core/Controller/CssController.php | |
parent | 22b3280ac2b60e52049a07ada007768e3cef05ed (diff) | |
download | nextcloud-server-4ef302c0be2047f78b1aa3976eba003a2c280f64.tar.gz nextcloud-server-4ef302c0be2047f78b1aa3976eba003a2c280f64.zip |
Request->getHeader() should always return a string
PHPDoc (of the public API) says that this method returns string but it also returns null, which is not allowed in some method calls. This fixes that behaviour and returns an empty string and fixes all code paths that explicitly checked for null to be still compliant.
Found while enabling the strict_typing for lib/private for the PHP7+ migration.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/Controller/CssController.php')
-rw-r--r-- | core/Controller/CssController.php | 2 |
1 files changed, 1 insertions, 1 deletions
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 |