summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareesAPIController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareesAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index 45c1b5e6dcf..17d258b3a8f 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -199,7 +199,9 @@ class ShareesAPIController extends OCSController {
list($result, $hasMoreResults) = $this->collaboratorSearch->search($search, $shareTypes, $lookup, $this->limit, $this->offset);
// extra treatment for 'exact' subarray, with a single merge expected keys might be lost
- $result['exact'] = array_merge($this->result['exact'], $result['exact']);
+ if(isset($result['exact'])) {
+ $result['exact'] = array_merge($this->result['exact'], $result['exact']);
+ }
$this->result = array_merge($this->result, $result);
$response = new DataResponse($this->result);
@@ -223,6 +225,7 @@ class ShareesAPIController extends OCSController {
*/
protected function isRemoteSharingAllowed($itemType) {
try {
+ // FIXME: static foo makes unit testing unnecessarily difficult
$backend = \OC\Share\Share::getBackend($itemType);
return $backend->isShareTypeAllowed(Share::SHARE_TYPE_REMOTE);
} catch (\Exception $e) {