Skip to content

Commit 6afceb4

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: Escape the delimiter in Glob::toRegex
2 parents 6a9fe9b + 6207dfe commit 6afceb4

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
@@ -66,7 +66,7 @@ public static function toRegex($glob, $strictLeadingDot = true, $strictWildcardS
6666
$firstByte = true;
6767
}
6868

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

0 commit comments

Comments
 (0)