Fix bug in getSource(), return false if target isn't in database
This commit is contained in:
parent
2c4fef91da
commit
d393ccfe2c
1 changed files with 5 additions and 1 deletions
|
@ -137,7 +137,11 @@ class OC_SHARE {
|
|||
return $result[0]['source'];
|
||||
} else {
|
||||
$folders = OC_SHARE::getParentFolders($target, false);
|
||||
return $folders['source'].substr($target, strlen($folders['target']));
|
||||
if ($folders == false) {
|
||||
return false;
|
||||
} else {
|
||||
return $folders['source'].substr($target, strlen($folders['target']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue