diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php index b2246226d33ba..a55406b302ea7 100644 --- a/apps/files_external/lib/Config/ConfigAdapter.php +++ b/apps/files_external/lib/Config/ConfigAdapter.php @@ -64,7 +64,7 @@ private function prepareStorageConfig(StorageConfig &$storage, IUser $user): voi */ 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()); diff --git a/lib/private/Files/Storage/StorageFactory.php b/lib/private/Files/Storage/StorageFactory.php index 6b5834049bffe..252f85e03d61c 100644 --- a/lib/private/Files/Storage/StorageFactory.php +++ b/lib/private/Files/Storage/StorageFactory.php @@ -52,7 +52,7 @@ public function removeStorageWrapper($wrapperName): void { * @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));