From 9c9395fd30a1a19c61d7e56241498f3a38ac0173 Mon Sep 17 00:00:00 2001 From: Luca Tumedei Date: Thu, 7 Nov 2024 08:34:13 +0100 Subject: [PATCH] fix(WPDb) fetch WPFilesystem module prefixed or not --- src/Module/WPDb.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Module/WPDb.php b/src/Module/WPDb.php index 88b1ca9cf..2ade5db7f 100644 --- a/src/Module/WPDb.php +++ b/src/Module/WPDb.php @@ -3405,8 +3405,11 @@ protected function scaffoldBlogTables(int $blogId, string $domainOrPath, bool $i protected function getWpFilesystemModule(): WPFilesystem { try { + // Support both a prefixed and not prefixed module name. /** @var WPFilesystem $fs */ - $fs = $this->getModule('\\' . WPFilesystem::class); + $fs = $this->hasModule('\\' . WPFilesystem::class) + ? $this->getModule('\\' . WPFilesystem::class) + : $this->getModule(WPFilesystem::class); return $fs; } catch (ModuleException) {