Merge pull request #2451 from owncloud/fix_npe_master

fix npe when createStorage() returns null
remotes/origin/stable6
Bernhard Posselt 12 years ago
commit 8858960a19
  1. 6
      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) {

Loading…
Cancel
Save