mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 02:30:09 +03:00
Fixed default-namespace causing router to break on closures.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user