Merge pull request #22190 from owncloud/fix_22189

Even single shares are returned as array
This commit is contained in:
Thomas Müller 2016-02-08 10:47:55 +01:00
commit 9eef38c593
2 changed files with 2 additions and 2 deletions

View File

@ -170,7 +170,7 @@ class Share20OCS {
if ($this->canAccessShare($share)) {
$share = $this->formatShare($share);
return new \OC_OCS_Result($share);
return new \OC_OCS_Result([$share]);
} else {
return new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.');
}

View File

@ -387,7 +387,7 @@ class Share20OCSTest extends \Test\TestCase {
['group', $group],
]));
$expected = new \OC_OCS_Result($result);
$expected = new \OC_OCS_Result([$result]);
$this->assertEquals($expected->getData(), $ocs->getShare($share->getId())->getData());
}