Fix bug in getSource(), return false if target isn't in database

This commit is contained in:
Michael Gapczynski 2011-07-12 20:18:08 -04:00
parent 2c4fef91da
commit d393ccfe2c
1 changed files with 5 additions and 1 deletions

View File

@ -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']));
}
}
}