[HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex

This commit is contained in:
Kévin Dunglas 2015-02-04 00:06:33 +01:00 committed by Fabien Potencier
parent 87c0659b14
commit 1aba7b4f3d
1 changed files with 1 additions and 1 deletions

View File

@ -1847,7 +1847,7 @@ class Request
$len = strlen($prefix);
if (preg_match("#^(%[[:xdigit:]]{2}|.){{$len}}#", $string, $match)) {
if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) {
return $match[0];
}