mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix: Fix test of IConstructableStorage implentation by storage classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
da591eaec3
commit
6ef05bafeb
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