Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpFoundation] use brace-style regex delimiters#27152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedMay 4, 2018
| Q | A |
|---|---|
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #27107 |
| License | MIT |
| Doc PR |
stof commentedMay 4, 2018
Simpler solution: use |
| { | ||
| self::$trustedHostPatterns =array_map(function ($hostPattern) { | ||
| returnsprintf('#%s#i',$hostPattern); | ||
| returnsprintf('#%s#i',preg_replace('/(?<!\\\\)#/','\\#',$hostPattern)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
lets' use {} as@stof suggested
xabbuh commentedMay 6, 2018
Status: Needs Review |
xabbuh commentedMay 6, 2018
I have switched to using curly braces as suggested by@stof. |
fabpot commentedMay 6, 2018
Thank you@xabbuh. |
This PR was merged into the 2.7 branch.Discussion----------[HttpFoundation] use brace-style regex delimiters| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#27107| License | MIT| Doc PR |Commits-------ae62d9b use brace-style regex delimiters