10000 minor #13583 [HttpFoundation] minor: clarify Request::getUrlencodedPr… · symfony/symfony@a6f1e8c · GitHub
[go: up one dir, main page]

Skip to content

Commit a6f1e8c

Browse files
committed
minor #13583 [HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex (dunglas)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #13583). Discussion ---------- [HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT | Doc PR | n/a The current notation used is confusing and displays an error in PHPStorm (probably a false positive). This PR clarify the notation. Commits ------- 1aba7b4 [HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex
2 parents 87c0659 + 1aba7b4 commit a6f1e8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ private function getUrlencodedPrefix($string, $prefix)
18471847

18481848
$len = strlen($prefix);
18491849

1850-
if (preg_match("#^(%[[:xdigit:]]{2}|.){{$len}}#", $string, $match)) {
1850+
if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) {
18511851
return $match[0];
18521852
}
18531853

0 commit comments

Comments
 (0)
0