Skip to content

Commit 860946a

Browse files
authored
Merge pull request #781 from w4tchout/patch-1
Fix the Override issue on Windows WAMP server
2 parents e308175 + 1b4b1e7 commit 860946a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

framework/library/astroid/Helper/Overrides.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static function generateExtensionPath(string $path) : string {
2222
return '';
2323
}
2424

25-
$path = explode('/', trim($path, '/'));
25+
$path = explode(DIRECTORY_SEPARATOR, trim($path, DIRECTORY_SEPARATOR));
2626

2727
$version = JVERSION;
2828
$extension = $path[0];
@@ -35,12 +35,12 @@ private static function generateExtensionPath(string $path) : string {
3535
else {
3636
\array_splice($path, 1, 0, ['tmpl']);
3737
}
38-
return JPATH_ROOT . '/components/' . \implode('/', $path);
38+
return JPATH_ROOT . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . \implode(DIRECTORY_SEPARATOR, $path);
3939
}
4040

4141
elseif (\strpos($extension, 'mod_') === 0) {
4242
\array_splice($path, 1, 0, ['tmpl']);
43-
return JPATH_ROOT . '/modules/' . \implode('/', $path);
43+
return JPATH_ROOT . DIRECTORY_SEPARATOR. 'modules' . DIRECTORY_SEPARATOR . \implode(DIRECTORY_SEPARATOR, $path);
4444
}
4545

4646
elseif (\strpos($extension, 'plg_') === 0) {
@@ -49,13 +49,13 @@ private static function generateExtensionPath(string $path) : string {
4949
\array_push($pluginPath, 'tmpl');
5050

5151
\array_splice($path, 0, 1, $pluginPath);
52-
return JPATH_ROOT . '/plugins/' . \implode('/', $path);
52+
return JPATH_ROOT . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . \implode(DIRECTORY_SEPARATOR, $path);
5353
}
5454
elseif ($extension === 'layouts') {
55-
return JPATH_ROOT . '/' . \implode('/', $path);
55+
return JPATH_ROOT . DIRECTORY_SEPARATOR . \implode(DIRECTORY_SEPARATOR, $path);
5656
}
5757

58-
return \implode('/', $path);
58+
return \implode(DIRECTORY_SEPARATOR, $path);
5959
}
6060

6161
public static function getHTMLTemplate(): string

0 commit comments

Comments
 (0)