mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #48446 from nextcloud/fix/fix-storage-interface-check
This commit is contained in:
commit
c7895bc3cf
2 changed files with 2 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ class ConfigAdapter implements IMountProvider {
|
|||
*/
|
||||
private function constructStorage(StorageConfig $storageConfig): IStorage {
|
||||
$class = $storageConfig->getBackend()->getStorageClass();
|
||||
if (!$class instanceof IConstructableStorage) {
|
||||
if (!is_a($class, IConstructableStorage::class, true)) {
|
||||
\OCP\Server::get(LoggerInterface::class)->warning('Building a storage not implementing IConstructableStorage is deprecated since 31.0.0', ['class' => $class]);
|
||||
}
|
||||
$storage = new $class($storageConfig->getBackendOptions());
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class StorageFactory implements IStorageFactory {
|
|||
* @return IStorage
|
||||
*/
|
||||
public function getInstance(IMountPoint $mountPoint, $class, $arguments): IStorage {
|
||||
if (!($class instanceof IConstructableStorage)) {
|
||||
if (!is_a($class, IConstructableStorage::class, true)) {
|
||||
\OCP\Server::get(LoggerInterface::class)->warning('Building a storage not implementing IConstructableStorage is deprecated since 31.0.0', ['class' => $class]);
|
||||
}
|
||||
return $this->wrap($mountPoint, new $class($arguments));
|
||||
|
|
|
|||
Loading…
Reference in a new issue