mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 06:08:46 -04:00
Merge pull request #18393 from owncloud/objectstore-check-class
make sure we actually have an object store
This commit is contained in:
commit
faa62d1799
1 changed files with 3 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue