Skip to content

Commit

Permalink
Remove invalid type-cast
Browse files Browse the repository at this point in the history
This is an `is_array` operation and not a `in_array` one. Thus this typecast is not required.

Fixes #20095
  • Loading branch information
LukasReschke committed Feb 13, 2016
1 parent 38ebc06 commit 9f3dad8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/ajax/share.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@
}

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,
Expand All @@ -336,8 +336,8 @@
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(
Expand Down

0 comments on commit 9f3dad8

Please sign in to comment.