8000 [HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex · alex-dev/symfony@1aba7b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1aba7b4

Browse files
dunglasfabpot
authored andcommitted
[HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex
1 parent 87c0659 commit 1aba7b4

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