diff --git a/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php b/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php index 8021568..cad587b 100644 --- a/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php +++ b/core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php @@ -156,8 +156,9 @@ public function enhance(array $defaults, Request $request) { // variables in the route path pattern. $route = $defaults[RouteObjectInterface::ROUTE_OBJECT]; $variables = array_flip($route->compile()->getVariables()); - // Because foreach copies the values from the array it iterates even if they - // are references, use it to break references. + // Foreach will copy the values from the array it iterates. Even if they + // are references, use it to break them. This avoids any scenarios where raw + // variables also get replaced with converted values. $raw_variables = array(); foreach (array_intersect_key($defaults, $variables) as $key => $value) { $raw_variables[$key] = $value;