Browse Source

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.
tags/v18.0.0beta1
waleczny 4 years ago
parent
commit
6e3ea09b1c
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      apps/files_sharing/lib/Controller/ShareAPIController.php

+ 1
- 1
apps/files_sharing/lib/Controller/ShareAPIController.php View File

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


Loading…
Cancel
Save