Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-02-02 22:08:23 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-03 16:45:28 +0300
commit53a780e31cbe903fbec7a8c5f11b5f994b88d8bf (patch)
tree23522c91325071b7cdf837cc74ba02fa52bac882 /lib
parent79e81c15c5beb4174922921083f0e838de9a3bfc (diff)
Do not try to get the jailed path if we can't find the id
Fixes #8047 If we can't find the file by id there we should just return null instead of trying to get the jailed path of null. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheJail.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php
index 357851bedd5..1ad00ba44c5 100644
--- a/lib/private/Files/Cache/Wrapper/CacheJail.php
+++ b/lib/private/Files/Cache/Wrapper/CacheJail.php
@@ -312,6 +312,10 @@ class CacheJail extends CacheWrapper {
*/
public function getPathById($id) {
$path = $this->getCache()->getPathById($id);
+ if ($path === null) {
+ return null;
+ }
+
return $this->getJailedPath($path);
}