From e7cc7653b885c49b1b3f0a78f91ea05a53e102d8 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Mon, 15 May 2023 15:17:19 +0330 Subject: Refactors "strpos" calls in lib/private to improve code readability. Signed-off-by: Faraz Samapoor --- lib/private/Encryption/Util.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/private/Encryption') diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index 6ae0006e955..a468908ffc8 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -311,10 +311,7 @@ class Util { // detect alternative key storage root $rootDir = $this->getKeyStorageRoot(); if ($rootDir !== '' && - 0 === strpos( - Filesystem::normalizePath($path), - Filesystem::normalizePath($rootDir) - ) + str_starts_with(Filesystem::normalizePath($path), Filesystem::normalizePath($rootDir)) ) { return true; } -- cgit v1.2.3