Skip to content

Commit

Permalink
Merge pull request #48446 from nextcloud/fix/fix-storage-interface-check
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Sep 30, 2024
2 parents da591ea + 6ef05ba commit c7895bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/files_external/lib/Config/ConfigAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/StorageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c7895bc

Please sign in to comment.