diff options
author | Faraz Samapoor <f.samapoor@gmail.com> | 2023-06-02 15:38:19 +0330 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2023-06-12 09:46:07 +0200 |
commit | 0bae21b1d1709e136a580b4ef2dc3cc725ca27b8 (patch) | |
tree | d86d68c9c2a7f70260863d62d7cd9c6af270e7ca /apps/dav/lib/DAV/PublicAuth.php | |
parent | c93be182dc0172eed377ba70ce54cd7c83689764 (diff) | |
download | nextcloud-server-0bae21b1d1709e136a580b4ef2dc3cc725ca27b8.tar.gz nextcloud-server-0bae21b1d1709e136a580b4ef2dc3cc725ca27b8.zip |
Refactors "strpos" calls in /apps/dav to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Diffstat (limited to 'apps/dav/lib/DAV/PublicAuth.php')
-rw-r--r-- | apps/dav/lib/DAV/PublicAuth.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/DAV/PublicAuth.php b/apps/dav/lib/DAV/PublicAuth.php index 83874ab0d4d..3ba8bb2f3c5 100644 --- a/apps/dav/lib/DAV/PublicAuth.php +++ b/apps/dav/lib/DAV/PublicAuth.php @@ -86,7 +86,7 @@ class PublicAuth implements BackendInterface { private function isRequestPublic(RequestInterface $request) { $url = $request->getPath(); $matchingUrls = array_filter($this->publicURLs, function ($publicUrl) use ($url) { - return strpos($url, $publicUrl, 0) === 0; + return str_starts_with($url, $publicUrl); }); return !empty($matchingUrls); } |