Skip to content

Commit

Permalink
Check for BP
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Nov 18, 2024
1 parent ce1873a commit c292706
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Observer/RegisterModuleForHyvaConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ private function getModulePath(string $moduleName): string
return $path;
}

return trim(str_replace(BP, '', $path), '/');
if (defined('BP')) {
$path = str_replace(BP, '', $path);
}

return trim($path, '/');
}

private function isAlreadyDefined(string $path, array $extensions = []): bool
Expand Down

0 comments on commit c292706

Please sign in to comment.