Merge pull request #2451 from owncloud/fix_npe_master

fix npe when createStorage() returns null
This commit is contained in:
Bernhard Posselt 2013-03-19 07:28:59 -07:00
commit 8858960a19

View file

@ -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) {