Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a6f1e8c

Browse filesBrowse 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
Copy full SHA for a6f1e8c

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/HttpFoundation/Request.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Request.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.