diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-02 20:08:23 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-03 14:45:28 +0100 |
commit | 53a780e31cbe903fbec7a8c5f11b5f994b88d8bf (patch) | |
tree | 23522c91325071b7cdf837cc74ba02fa52bac882 /lib/private/Files/Cache | |
parent | 79e81c15c5beb4174922921083f0e838de9a3bfc (diff) | |
download | nextcloud-server-53a780e31cbe903fbec7a8c5f11b5f994b88d8bf.tar.gz nextcloud-server-53a780e31cbe903fbec7a8c5f11b5f994b88d8bf.zip |
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/private/Files/Cache')
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 4 |
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); } |