Initialized response to null to be safe
This commit is contained in:
parent
bb052625af
commit
aaaf644118
|
|
@ -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]();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue