Skip to content

Commit 0cbe10a

Browse files
authored
Merge pull request #3 from solleer/patch-9
Fix regex issue
2 parents 0499357 + 86708c1 commit 0cbe10a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ModuleJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function find(array $route) {
4040

4141
private function getRouteDir($moduleName) {
4242
$files = glob($this->moduleDir . '/*');
43-
$match = preg_grep('/' . $this->moduleDir . '\/' . $moduleName . '/i', $files);
43+
$match = preg_grep('/^' . $this->moduleDir . '\/' . $moduleName . '$/i', $files);
4444
return array_values($match)[0] ?? false;
4545
}
4646

0 commit comments

Comments
 (0)