Skip to content

Commit 622a9d0

Browse files
committed
Use DIRECTORY_SEPARATOR constant to avoid Windows issues
1 parent f0b76fd commit 622a9d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AppBundle/Twig/SourceCodeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ private function getControllerRelativePath()
8282
$class = new \ReflectionClass($className);
8383

8484
$absolutePath = $class->getFilename();
85-
$pathParts = explode('/src/', $absolutePath);
86-
$relativePath = 'src/'.$pathParts[1];
85+
$pathParts = explode(DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR, $absolutePath);
86+
$relativePath = 'src'.DIRECTORY_SEPARATOR.$pathParts[1];
8787

8888
return $relativePath;
8989
}

0 commit comments

Comments
 (0)