File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ public static function isAbsolute(string $path): bool
368368 }
369369
370370 // Strip scheme
371- if (false !== $ schemeSeparatorPosition = strpos ($ path , ':// ' )) {
371+ if (false !== ( $ schemeSeparatorPosition = strpos ($ path , ':// ' )) && 1 !== $ schemeSeparatorPosition ) {
372372 $ path = substr ($ path , $ schemeSeparatorPosition + 3 );
373373 }
374374
Original file line number Diff line number Diff line change @@ -375,6 +375,8 @@ public static function provideIsAbsolutePathTests(): \Generator
375375
376376 yield ['C:/css/style.css ' , true ];
377377 yield ['D:/ ' , true ];
378+ yield ['C:///windows ' , true ];
379+ yield ['C://test ' , true ];
378380
379381 yield ['E: \\css \\style.css ' , true ];
380382 yield ['F: \\' , true ];
You can’t perform that action at this time.
0 commit comments