Merge pull request #14023 from william-p/OS_params

Fix: Check if `$this->params['user']` is an array
This commit is contained in:
Morris Jobke 2019-02-07 14:30:23 +01:00 committed by GitHub
commit 6dc21fff45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,7 +122,7 @@ class SwiftFactory {
'handler' => HandlerStack::create()
]);
if (isset($this->params['user']) && isset($this->params['user']['name'])) {
if (isset($this->params['user']) && is_array($this->params['user']) && isset($this->params['user']['name'])) {
if (!isset($this->params['scope'])) {
throw new StorageAuthException('Scope has to be defined for V3 requests');
}