Skip to content

Commit 0297b11

Browse files
committed
fix: normalize path separators in getExtensionFromPath
1 parent e47bc9f commit 0297b11

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Service/Hyva/IncompatibilityDetector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ public function getSeveritySymbol(string $severity): string
214214
*/
215215
private function getExtensionFromPath(string $path): string
216216
{
217-
$trimmed = rtrim($path, '/');
217+
$normalized = str_replace('\\', '/', $path);
218+
$trimmed = rtrim($normalized, '/');
218219
$pos = strrpos($trimmed, '/');
219220
$basename = $pos === false ? $trimmed : substr($trimmed, $pos + 1);
220221
$dot = strrpos($basename, '.');

0 commit comments

Comments
 (0)