Skip to content

Commit 176d7bf

Browse files
committed
minor #17629 [2.3] Fixed an undefined variable in Glob::toRegex (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] Fixed an undefined variable in Glob::toRegex | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | symfony/symfony-docs#123 Note: to be merged **only in Symfony 2.3**. `$delimiter` variable exists in the rest of Symfony versions. Commits ------- 68b0200 [2.3] Fixed an undefined variable in Glob::toRegex
2 parents e3e10e3 + 68b0200 commit 176d7bf

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

0 commit comments

Comments
 (0)