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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy