From a6f180f24e850dff7c0f5541c814b63d5007df40 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 29 Oct 2015 15:04:11 +0100 Subject: [PATCH] Remove invalid type-cast This is an `is_array` operation and not a `in_array` one. Thus this typecast is not required. Fixes https://github.com/owncloud/core/issues/20095 --- core/ajax/share.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/ajax/share.php b/core/ajax/share.php index 68afd7b4e8..fd42a94de6 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -360,8 +360,8 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo } if ((!isset($_GET['itemShares']) - || !is_array((string)$_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) - || !in_array($uid, (string)$_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) + || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) + || !in_array($uid, $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) && $uid != OC_User::getUser()) { $shareWith[] = array( 'label' => $displayName, @@ -386,8 +386,8 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo if ($count < $request_limit) { if (!isset($_GET['itemShares']) || !isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) - || !is_array((string)$_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) - || !in_array($group, (string)$_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])) { + || !is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) + || !in_array($group, $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])) { $shareWith[] = array( 'label' => $group, 'value' => array(