make sure we actually have an object store

This commit is contained in:
Robin Appelman 2015-08-28 16:13:19 +02:00
parent efeef958a3
commit d14252d9c7
1 changed files with 3 additions and 0 deletions

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));
}