diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-08 10:47:55 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-08 10:47:55 +0100 |
commit | 9eef38c5937cf8c8a848a0b78afe8123fb922712 (patch) | |
tree | 29ac91b6c37c85bd0a5e08773d047af23dcb02fd | |
parent | 03ca63c2246278345f5886d23ca950bb20c72fc5 (diff) | |
parent | ca32778975323e743f0a0c7c548d44e283eb6813 (diff) | |
download | nextcloud-server-9eef38c5937cf8c8a848a0b78afe8123fb922712.tar.gz nextcloud-server-9eef38c5937cf8c8a848a0b78afe8123fb922712.zip |
Merge pull request #22190 from owncloud/fix_22189
Even single shares are returned as array
-rw-r--r-- | apps/files_sharing/api/share20ocs.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/api/share20ocstest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/api/share20ocs.php b/apps/files_sharing/api/share20ocs.php index d7c5d004d9c..c03243d1d41 100644 --- a/apps/files_sharing/api/share20ocs.php +++ b/apps/files_sharing/api/share20ocs.php @@ -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.'); } diff --git a/apps/files_sharing/tests/api/share20ocstest.php b/apps/files_sharing/tests/api/share20ocstest.php index a93cd5f58ce..97abdca7ac3 100644 --- a/apps/files_sharing/tests/api/share20ocstest.php +++ b/apps/files_sharing/tests/api/share20ocstest.php @@ -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()); } |