We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0b76fd commit 622a9d0Copy full SHA for 622a9d0
src/AppBundle/Twig/SourceCodeExtension.php
@@ -82,8 +82,8 @@ private function getControllerRelativePath()
82
$class = new \ReflectionClass($className);
83
84
$absolutePath = $class->getFilename();
85
- $pathParts = explode('/src/', $absolutePath);
86
- $relativePath = 'src/'.$pathParts[1];
+ $pathParts = explode(DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, $absolutePath);
+ $relativePath = 'src'.DIRECTORY_SEPARATOR.$pathParts[1];
87
88
return $relativePath;
89
}
0 commit comments