Commit 46fac92
committed
fix(files_external): guard optional S3 key in storage id computation
S3 external 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.
Guard the access with `?? ''`. This aligns the id computation with
paramCredentialProvider(), which already treats `key` as optional and
falls through to the SDK default provider chain when it is absent. The
value only feeds an md5() hash, so keyless mounts keep a stable id.
Fixes #63564
Assisted-by: Kiro:claude-opus-4.8
Signed-off-by: Sebastian Cruz <default50@gmail.com>1 parent a17770e commit 46fac92
2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| 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 | + | |
0 commit comments