diff options
author | Robin Appelman <robin@icewind.nl> | 2021-03-24 14:56:40 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-03-24 14:56:40 +0100 |
commit | 8a92229485095dbd8f379e2b489a3aa48cc37c79 (patch) | |
tree | c2625fc1dd67a28f6cb95746f4ae8a2d6805dcf6 /apps/encryption | |
parent | e8184eaaada6bfe373877226e4a1ddfab2b2a1c6 (diff) | |
download | nextcloud-server-8a92229485095dbd8f379e2b489a3aa48cc37c79.tar.gz nextcloud-server-8a92229485095dbd8f379e2b489a3aa48cc37c79.zip |
getStorage can also return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/lib/Crypto/Encryption.php | 2 | ||||
-rw-r--r-- | apps/encryption/lib/Util.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 6fa388e8875..51c5122eb93 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -435,7 +435,7 @@ class Encryption implements IEncryptionModule { public function shouldEncrypt($path) { if ($this->util->shouldEncryptHomeStorage() === false) { $storage = $this->util->getStorage($path); - if ($storage->instanceOfStorage('\OCP\Files\IHomeStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\IHomeStorage')) { return false; } } diff --git a/apps/encryption/lib/Util.php b/apps/encryption/lib/Util.php index 2b11b8151c0..139dd3f50fa 100644 --- a/apps/encryption/lib/Util.php +++ b/apps/encryption/lib/Util.php @@ -191,7 +191,7 @@ class Util { * get storage of path * * @param string $path - * @return \OC\Files\Storage\Storage + * @return \OC\Files\Storage\Storage|null */ public function getStorage($path) { return $this->files->getMount($path)->getStorage(); |