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/JsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/Controller/JsController.php') diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php index 885de5491e7..6b3e7ff2ed2 100644 --- a/core/Controller/JsController.php +++ b/core/Controller/JsController.php @@ -99,7 +99,7 @@ class JsController 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