Initialized response to null to be safe

This commit is contained in:
Phil 2015-01-01 20:21:17 +00:00
parent bb052625af
commit aaaf644118
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ class Router implements HandlerInterface
*/ */
public function getResponse(RequestInterface $request, array $args = null) public function getResponse(RequestInterface $request, array $args = null)
{ {
$response = null;
$path = $request->getPath(); $path = $request->getPath();
if (array_key_exists($path, $this->routes)) { if (array_key_exists($path, $this->routes)) {
$handler = new $this->routes[$path](); $handler = new $this->routes[$path]();