1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-26 23:54:25 +01:00

fix undefined offset warning

This commit is contained in:
Arthur Schiwon 2016-08-27 00:50:07 +02:00
parent 87680b01fc
commit 90a0b39e11
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23

View File

@ -43,8 +43,12 @@ class PublicController extends ApiController {
return $this->newJsonErrorMessage("User could not be identified"); return $this->newJsonErrorMessage("User could not be identified");
} }
if ($tags[0] == "") { if (!is_array($tags)) {
$tags = array(); if(is_string($tags) && $tags !== '') {
$tags = [ $tags ];
} else {
$tags = array();
}
} }
$public = true; $public = true;