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>
pull/8196/head
Roeland Jago Douma 2018-02-02 20:08:23 +07:00
parent 3df8021406
commit 10efe528ed
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 0 deletions

@ -311,6 +311,10 @@ class CacheJail extends CacheWrapper {
*/
public function getPathById($id) {
$path = $this->getCache()->getPathById($id);
if ($path === null) {
return null;
}
return $this->getJailedPath($path);
}