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:
parent
5195be108f
commit
6e3ea09b1c
|
@ -181,7 +181,7 @@ class ShareAPIController extends OCSController {
|
||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$node = $nodes[0];
|
$node = reset($nodes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue