Skip to content

Commit

Permalink
Merge pull request #287 from owncloud/fix-warning
Browse files Browse the repository at this point in the history
fix undefined offset warning
  • Loading branch information
blizzz authored Aug 26, 2016
2 parents 87680b0 + 90a0b39 commit 8a04a7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controller/rest/publiccontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ public function returnAsJson($user, $password = null, $tags = array(), $conjunct
return $this->newJsonErrorMessage("User could not be identified");
}

if ($tags[0] == "") {
$tags = array();
if (!is_array($tags)) {
if(is_string($tags) && $tags !== '') {
$tags = [ $tags ];
} else {
$tags = array();
}
}

$public = true;
Expand Down

0 comments on commit 8a04a7b

Please # to comment.