Skip to content

Commit

Permalink
Merge pull request #762 from lucatume/v4-issue-761
Browse files Browse the repository at this point in the history
v4 - locate WPFilesystem module with or without leading slash
  • Loading branch information
lucatume authored Nov 8, 2024
2 parents 73e4955 + 9c9395f commit 0ba580b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Module/WPDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0ba580b

Please sign in to comment.