Fixed default-namespace causing router to break on closures.

This commit is contained in:
Simon Sessingø
2017-11-25 01:31:43 +01:00
parent 927f8d7b3c
commit c29c52ae16

View File

@@ -427,7 +427,7 @@ class SimpleRouter
$callback = $route->getCallback();
/* Only add default namespace on relative callbacks */
if ($callback === null || $callback[0] !== '\\') {
if ($callback === null || (is_string($callback) === true && $callback[0] !== '\\')) {
$namespace = static::$defaultNamespace;