mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix for #17178
If no array of arrays is submitted make sure we still keep $sharedUsers and $sharedGroups as arrays so the rest of the code keeps functioning as it should.
This commit is contained in:
parent
9be1d08c3c
commit
27d5838fb7
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue