diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-10-29 15:04:11 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-02-13 14:28:58 +0100 |
commit | 9f3dad8353a135bd6524d9b21c90d30d4f7dde1f (patch) | |
tree | 55795b298b931f5571970f7e66759e048dcaf741 /core | |
parent | 38ebc06aa9999140054861ee1f7c74caa25185ce (diff) | |
download | nextcloud-server-9f3dad8353a135bd6524d9b21c90d30d4f7dde1f.tar.gz nextcloud-server-9f3dad8353a135bd6524d9b21c90d30d4f7dde1f.zip |
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
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/share.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index c1eaa8ec260..d3703a95beb 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -310,8 +310,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, @@ -336,8 +336,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( |