aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-06-01 23:10:00 +0200
committerGitHub <noreply@github.com>2023-06-01 23:10:00 +0200
commit9f1d497a0b4dbda86e676a3a55758bc2909cc781 (patch)
tree968db9431470d4d0e1ea7c80caed373fc9029120 /lib/private/Files/ObjectStore
parente81fdfefab6d46b9d326b70c278d52fbb941a431 (diff)
parentfa31c707c0a4c2a72141b8017e66561710185a06 (diff)
downloadnextcloud-server-9f1d497a0b4dbda86e676a3a55758bc2909cc781.tar.gz
nextcloud-server-9f1d497a0b4dbda86e676a3a55758bc2909cc781.zip
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
Refactors "strpos" calls in lib/private to improve code readability.
Diffstat (limited to 'lib/private/Files/ObjectStore')
-rw-r--r--lib/private/Files/ObjectStore/S3Signature.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php
index 64b994bac22..cf3d29c4185 100644
--- a/lib/private/Files/ObjectStore/S3Signature.php
+++ b/lib/private/Files/ObjectStore/S3Signature.php
@@ -107,7 +107,7 @@ class S3Signature implements SignatureInterface {
// Move X-Amz-* headers to the query string
foreach ($request->getHeaders() as $name => $header) {
$name = strtolower($name);
- if (strpos($name, 'x-amz-') === 0) {
+ if (str_starts_with($name, 'x-amz-')) {
$query[$name] = implode(',', $header);
}
}
@@ -169,7 +169,7 @@ class S3Signature implements SignatureInterface {
$headers = [];
foreach ($request->getHeaders() as $name => $header) {
$name = strtolower($name);
- if (strpos($name, 'x-amz-') === 0) {
+ if (str_starts_with($name, 'x-amz-')) {
$value = implode(',', $header);
if (strlen($value) > 0) {
$headers[$name] = $name . ':' . $value;