Content-Length: 289011 | pFad | http://github.com/symfony/symfony/commit/3cfef01b533b3770d91c25c55d9f23a89bdb50d2

47 Update src/Symfony/Component/HttpKernel/EventListener/RouterListener.php · symfony/symfony@3cfef01 · GitHub
Skip to content

Commit 3cfef01

Browse files
Update src/Symfony/Component/HttpKernel/EventListener/RouterListener.php
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent b492022 commit 3cfef01

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/Symfony/Component/HttpKernel/EventListener/RouterListener.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,13 @@ public function onKernelRequest(RequestEvent $event): void
117117
$attributes = [];
118118

119119
foreach ($parameters as $parameter => $value) {
120-
if(isset($mapping[$parameter])) {
121-
if(is_array($mapping[$parameter])) {
122-
[$attribute, $parameter] = $mapping[$parameter];
123-
$mappedAttributes[$attribute] = '';
124-
} else {
125-
$attribute = $mapping[$parameter];
126-
}
127-
128-
} else {
120+
if (!isset($mapping[$parameter])) {
129121
$attribute = $parameter;
122+
} elseif (\is_array($mapping[$parameter])) {
123+
[$attribute, $parameter] = $mapping[$parameter];
124+
$mappedAttributes[$attribute] = '';
125+
} else {
126+
$attribute = $mapping[$parameter];
130127
}
131128

132129
if (!isset($mappedAttributes[$attribute])) {

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/symfony/symfony/commit/3cfef01b533b3770d91c25c55d9f23a89bdb50d2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy