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 Oct 29, 2015
1 parent 1ce911d commit a6f180f
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 @@ -360,8 +360,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 @@ -386,8 +386,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 a6f180f

Please sign in to comment.