summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/ajax/share.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index e78d274815d..f84325dc17e 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -273,8 +273,15 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
$sharedUsers = [];
$sharedGroups = [];
if (isset($_GET['itemShares'])) {
- $sharedUsers = isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) ? $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER] : [];
- $sharedGroups = isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) ? $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP] : [];
+ if (isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) &&
+ is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) {
+ $sharedUsers = $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER];
+ }
+
+ if (isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) &&
+ is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])) {
+ $sharedGroups = isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]);
+ }
}
$count = 0;