From a1ef0285f89112b8777eb47f3c34d07f111660b4 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Fri, 2 Jun 2023 13:13:19 +0330 Subject: Refactors "strpos" calls in /core to improve code readability. Signed-off-by: Faraz Samapoor --- core/Controller/CssController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/Controller/CssController.php') diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php index 4cd2996835e..792be71f9e1 100644 --- a/core/Controller/CssController.php +++ b/core/Controller/CssController.php @@ -101,7 +101,7 @@ class CssController extends Controller { private function getFile(ISimpleFolder $folder, string $fileName, bool &$gzip): ISimpleFile { $encoding = $this->request->getHeader('Accept-Encoding'); - if (strpos($encoding, 'gzip') !== false) { + if (str_contains($encoding, 'gzip')) { try { $gzip = true; return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz -- cgit v1.2.3