Merge pull request #14086 from nextcloud/backport/14023/stable14

[stable14] Fix: Check if `$this->params['user']` is an array
This commit is contained in:
Roeland Jago Douma 2019-02-14 19:50:01 +01:00 committed by GitHub
commit 5330739cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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');
}