Fixed is_array being used instead of array_key_exists.
This commit is contained in:
parent
5cda6fbe25
commit
8a5059c7ec
|
@ -52,7 +52,7 @@ class HttpRouter implements IRouter {
|
||||||
|
|
||||||
$prepared = self::preparePath($path, false);
|
$prepared = self::preparePath($path, false);
|
||||||
if($prepared === false) {
|
if($prepared === false) {
|
||||||
if(is_array($this->staticRoutes[$path]))
|
if(array_key_exists($path, $this->staticRoutes))
|
||||||
$this->staticRoutes[$path][$method] = $handler;
|
$this->staticRoutes[$path][$method] = $handler;
|
||||||
else
|
else
|
||||||
$this->staticRoutes[$path] = [$method => $handler];
|
$this->staticRoutes[$path] = [$method => $handler];
|
||||||
|
|
Loading…
Reference in a new issue