diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-19 07:28:59 -0700 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-19 07:28:59 -0700 |
commit | 8858960a19d70b21296f0a2876344637361b0697 (patch) | |
tree | 4f8b919072dce4ea6a38207894166935ef485893 | |
parent | a0ae2ab11a4dbbd1df19b51237029b1fcb942a56 (diff) | |
parent | 39665cfa6bc579aa32bd9cf299f776771ed9d60b (diff) | |
download | nextcloud-server-8858960a19d70b21296f0a2876344637361b0697.tar.gz nextcloud-server-8858960a19d70b21296f0a2876344637361b0697.zip |
Merge pull request #2451 from owncloud/fix_npe_master
fix npe when createStorage() returns null
-rw-r--r-- | lib/files/mount.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/files/mount.php b/lib/files/mount.php index 1c9382d78e7..59c98e9dcc8 100644 --- a/lib/files/mount.php +++ b/lib/files/mount.php @@ -90,7 +90,11 @@ class Mount { public function getStorageId() { if (!$this->storageId) { if (is_null($this->storage)) { - $this->storage = $this->createStorage(); + $storage = $this->createStorage(); //FIXME: start using exceptions + if (is_null($storage)) { + return null; + } + $this->storage = $storage; } $this->storageId = $this->storage->getId(); if (strlen($this->storageId) > 64) { |