Skip to content

Commit 6207dfe

Browse files
javiereguiluzfabpot
authored andcommitted
Escape the delimiter in Glob::toRegex
1 parent c2a5340 commit 6207dfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Glob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function toRegex($glob, $strictLeadingDot = true, $strictWildcardS
6565
$firstByte = true;
6666
}
6767

68-
if ('.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
68+
if ($delimiter === $car || '.' === $car || '(' === $car || ')' === $car || '|' === $car || '+' === $car || '^' === $car || '$' === $car) {
6969
$regex .= "\\$car";
7070
} elseif ('*' === $car) {
7171
$regex .= $escaping ? '\\*' : ($strictWildcardSlash ? '[^/]*' : '.*');

0 commit comments

Comments
 (0)