Skip to content

Commit 8a04a7b

Browse files
authored
Merge pull request #287 from owncloud/fix-warning
fix undefined offset warning
2 parents 87680b0 + 90a0b39 commit 8a04a7b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

controller/rest/publiccontroller.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ public function returnAsJson($user, $password = null, $tags = array(), $conjunct
4343
return $this->newJsonErrorMessage("User could not be identified");
4444
}
4545

46-
if ($tags[0] == "") {
47-
$tags = array();
46+
if (!is_array($tags)) {
47+
if(is_string($tags) && $tags !== '') {
48+
$tags = [ $tags ];
49+
} else {
50+
$tags = array();
51+
}
4852
}
4953

5054
$public = true;

0 commit comments

Comments
 (0)