Merge pull request #22190 from owncloud/fix_22189
Even single shares are returned as array
This commit is contained in:
commit
9eef38c593
|
@ -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.');
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue