Merge pull request #2451 from owncloud/fix_npe_master
fix npe when createStorage() returns null
This commit is contained in:
commit
8858960a19
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue