From 1cb3872df06f8c86b256a8f86ef556f325634617 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 19 Mar 2013 14:18:44 +0100 Subject: [PATCH] fix npe when createStorage() returns null --- lib/files/mount.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 2.39.5