Skip to content

Commit

Permalink
Fix: the method Path::parse returned a string . when an empty str…
Browse files Browse the repository at this point in the history
…ing was passed as the argument
  • Loading branch information
tg666 committed Oct 27, 2021
1 parent 4cf8a39 commit e90c480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helper/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function parse(string $path): array
$name = explode('.', array_pop($namespace));
$startsWithDot = FALSE;

if ('' === $name[0] ?? NULL) {
if (1 < count($name) && '' === $name[0] ?? NULL) {
unset($name[0]);
$startsWithDot = TRUE;
}
Expand Down

0 comments on commit e90c480

Please sign in to comment.