diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 90a76e2223..e7b9f5e604 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -181,7 +181,7 @@ class ShareAPIController extends OCSController { throw new NotFoundException(); } } else { - $node = $nodes[0]; + $node = reset($nodes); } }