Merge pull request #392 from nextcloud/fix/access_key

Fix key-exists error
This commit is contained in:
Jan C. Borchardt 2020-05-22 17:46:28 +02:00 committed by GitHub
commit 9c7fae103d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,7 +214,7 @@ class ApiController extends Controller {
// Make sure we only store id
try {
if ($keyValuePairs['access']) {
if (array_key_exists('access', $keyValuePairs)) {
$keyValuePairs['access']['users'] = array_map(function (array $user): string {
return $user['shareWith'];
}, $keyValuePairs['access']['users']);