Get first element of nodes array

Geting first element of nodes array instead of element with key 0. In some cases key 0 not exists in this array ie. when file is shared from group folder with member of this group who have no permission to read this file.
This commit is contained in:
waleczny 2019-11-18 23:33:26 +01:00 committed by GitHub
parent 5195be108f
commit 6e3ea09b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class ShareAPIController extends OCSController {
throw new NotFoundException();
}
} else {
$node = $nodes[0];
$node = reset($nodes);
}
}