mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 13:22:14 +00:00
Fixed default-namespace causing router to break on closures.
This commit is contained in:
@@ -427,7 +427,7 @@ class SimpleRouter
|
|||||||
$callback = $route->getCallback();
|
$callback = $route->getCallback();
|
||||||
|
|
||||||
/* Only add default namespace on relative callbacks */
|
/* Only add default namespace on relative callbacks */
|
||||||
if ($callback === null || $callback[0] !== '\\') {
|
if ($callback === null || (is_string($callback) === true && $callback[0] !== '\\')) {
|
||||||
|
|
||||||
$namespace = static::$defaultNamespace;
|
$namespace = static::$defaultNamespace;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user