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 ...@@ -250,22 +250,20 @@ class Framework extends HttpKernel
*/ */
public function parseRequest(EventInterface $event) public function parseRequest(EventInterface $event)
{ {
$request = $event->get('request'); $this->request = $event->get('request');
$matcher = new UrlMatcher($this->routes, array( $matcher = new UrlMatcher($this->routes, array(
'base_url' => $request->getBaseUrl(), 'base_url' => $this->request->getBaseUrl(),
'method' => $request->getMethod(), 'method' => $this->request->getMethod(),
'host' => $request->getHost(), 'host' => $this->request->getHost(),
'is_secure' => $request->isSecure(), 'is_secure' => $this->request->isSecure(),
)); ));
if (false === $attributes = $matcher->match($request->getPathInfo())) { if (false === $attributes = $matcher->match($this->request->getPathInfo())) {
return false; return false;
} }
$request->attributes->add($attributes); $this->request->attributes->add($attributes);
$this->request = $request;
} }
/** /**
......
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