Merge pull request #18393 from owncloud/objectstore-check-class

make sure we actually have an object store
This commit is contained in:
Lukas Reschke 2015-08-29 10:11:39 +02:00
commit faa62d1799

View file

@ -74,6 +74,9 @@ class ConfigAdapter implements IMountProvider {
$objectStore = $storage->getBackendOption('objectstore');
if ($objectStore) {
$objectClass = $objectStore['class'];
if (!is_subclass_of($objectClass, '\OCP\Files\ObjectStore\IObjectStore')) {
throw new \InvalidArgumentException('Invalid object store');
}
$storage->setBackendOption('objectstore', new $objectClass($objectStore));
}