diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-03-19 15:02:29 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-03-19 15:02:29 +0100 |
commit | 39665cfa6bc579aa32bd9cf299f776771ed9d60b (patch) | |
tree | 037bc7170359d3a05f82813a972bb13d13baad92 /lib | |
parent | aa3973d365a5cefccbf42bcc445d1fce6cad033e (diff) | |
download | nextcloud-server-39665cfa6bc579aa32bd9cf299f776771ed9d60b.tar.gz nextcloud-server-39665cfa6bc579aa32bd9cf299f776771ed9d60b.zip |
fix npe when createStorage() returns null
Diffstat (limited to 'lib')
-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) { |