From 019e0f5c7bad01b2cb0c003c488060f3ee24e1d1 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 5 Jan 2020 15:51:16 +0100 Subject: [PATCH] Do not use $_GET The appframework is more than capable of handling this properly. Signed-off-by: Roeland Jago Douma --- apps/files_sharing/lib/Controller/ShareesAPIController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index d556ab76f6537..33fcb0002f82e 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -198,8 +198,8 @@ public function search(string $search = '', string $itemType = null, int $page = $shareTypes[] = Share::SHARE_TYPE_CIRCLE; } - if (isset($_GET['shareType']) && is_array($_GET['shareType'])) { - $shareTypes = array_intersect($shareTypes, $_GET['shareType']); + if ($shareType !== null && is_array($shareType)) { + $shareTypes = array_intersect($shareTypes, $shareType); sort($shareTypes); } else if (is_numeric($shareType)) { $shareTypes = array_intersect($shareTypes, [(int) $shareType]);