mirror of
https://github.com/nextcloud/server.git
synced 2026-10-03 16:58:44 +02:00
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>