Skip to content

Commit 8fd6ca9

Browse files
committed
bug #17526 Escape the delimiter in Glob::toRegex (javiereguiluz)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #17526). Discussion ---------- Escape the delimiter in Glob::toRegex | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13531 | License | MIT | Doc PR | - Commits ------- bb3964b Escape the delimiter in Glob::toRegex
2 parents 84f47a3 + bb3964b commit 8fd6ca9

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)