Commit 0b4d3d5d authored by Guillermo's avatar Guillermo

Fixed request not being saved in Framework->request attribute when no matching...

Fixed request not being saved in Framework->request attribute when no matching routes are found for a certaing request URI
parent 4f766781
......@@ -250,22 +250,20 @@ class Framework extends HttpKernel
*/
public function parseRequest(EventInterface $event)
{
$request = $event->get('request');
$this->request = $event->get('request');
$matcher = new UrlMatcher($this->routes, array(
'base_url' => $request->getBaseUrl(),
'method' => $request->getMethod(),
'host' => $request->getHost(),
'is_secure' => $request->isSecure(),
'base_url' => $this->request->getBaseUrl(),
'method' => $this->request->getMethod(),
'host' => $this->request->getHost(),
'is_secure' => $this->request->isSecure(),
));
if (false === $attributes = $matcher->match($request->getPathInfo())) {
if (false === $attributes = $matcher->match($this->request->getPathInfo())) {
return false;
}
$request->attributes->add($attributes);
$this->request = $request;
$this->request->attributes->add($attributes);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment