Issue #2854543 by Wim Leers, polynya, dawehner, mpdonadio, gabesullice, larowlan, klausi: NegotiationMiddleware calls $request->setRequestFormat('html') when there is no _format request parameter, but shouldn't

merge-requests/1654/head
Lee Rowlands 2018-05-12 08:20:15 +10:00
parent 41dfad388c
commit 2b331d00bf
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class RequestFormatRouteFilter implements FilterInterface {
$route_formats = !$route->hasRequirement('_format') $route_formats = !$route->hasRequirement('_format')
? ['html'] ? ['html']
: explode('|', $route->getRequirement('_format')); : explode('|', $route->getRequirement('_format'));
return array_merge($carry,$route_formats); return array_merge($carry, $route_formats);
}, []); }, []);
$formats = array_unique(array_filter($all_formats)); $formats = array_unique(array_filter($all_formats));