Commit 1079161
fix(files_external): default optional S3 key in parseParams
S3 mounts that authenticate via the AWS SDK default credential chain
(env vars, EC2 instance profile, ECS task role) carry no static `key`
param. AmazonS3::__construct() read $this->params['key'] unconditionally
when deriving the storage id, emitting an "Undefined array key" warning
on every storage construction for such mounts.
Default `key` to an empty string in S3ConnectionTrait::parseParams(),
alongside the other normalized params, so it is always set before the id
is derived. The only other reader, paramCredentialProvider(), uses an
empty() check that treats '' the same as an absent key, so the SDK
default provider chain is still used when no key is configured.
Fixes #63564
Assisted-by: Kiro:claude-opus-4.8
Signed-off-by: Sebastian Cruz <default50@gmail.com>1 parent 980e5ee commit 1079161
2 files changed
Lines changed: 33 additions & 0 deletions
File tree
- apps/files_external/tests/Storage
- lib/private/Files/ObjectStore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments