diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 04:37:57 +0330 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-23 15:54:10 +0100 |
commit | 7bf31df0bc340872a7fb0ce1eb8d11d036189166 (patch) | |
tree | 7b2e9d7c6128395a5c49cbd38d1cde41a8d4e984 /apps/dav/lib/BulkUpload | |
parent | a88c1bdfb61d4c141d90e6864971f6d456417604 (diff) | |
download | nextcloud-server-7bf31df0bc340872a7fb0ce1eb8d11d036189166.tar.gz nextcloud-server-7bf31df0bc340872a7fb0ce1eb8d11d036189166.zip |
Refactors "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'apps/dav/lib/BulkUpload')
-rw-r--r-- | apps/dav/lib/BulkUpload/MultipartRequestParser.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/dav/lib/BulkUpload/MultipartRequestParser.php b/apps/dav/lib/BulkUpload/MultipartRequestParser.php index 2541ea8f333..7c977b42ccb 100644 --- a/apps/dav/lib/BulkUpload/MultipartRequestParser.php +++ b/apps/dav/lib/BulkUpload/MultipartRequestParser.php @@ -82,7 +82,7 @@ class MultipartRequestParser { $boundaryValue = trim($boundaryValue); // Remove potential quotes around boundary value. - if (substr($boundaryValue, 0, 1) === '"' && substr($boundaryValue, -1) === '"') { + if (str_starts_with($boundaryValue, '"') && str_ends_with($boundaryValue, '"')) { $boundaryValue = substr($boundaryValue, 1, -1); } |