Skip to content

Commit 681f74d

Browse files
committed
fix: auto routing legacy does not work at all
1 parent aa93ae2 commit 681f74d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

system/Router/RouteCollection.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ class RouteCollection implements RouteCollectionInterface
2828
{
2929
/**
3030
* The namespace to be added to any Controllers.
31-
* Defaults to the global namespaces (\)
31+
* Defaults to the global namespaces (\).
32+
*
33+
* This must have a trailing backslash (\).
3234
*
3335
* @var string
3436
*/
@@ -288,7 +290,7 @@ public function __construct(FileLocator $locator, Modules $moduleConfig, Routing
288290
$this->httpHost = Services::request()->getServer('HTTP_HOST');
289291

290292
// Setup based on config file. Let routes file override.
291-
$this->defaultNamespace = $routing->defaultNamespace;
293+
$this->defaultNamespace = rtrim($routing->defaultNamespace, '\\') . '\\';
292294
$this->defaultController = $routing->defaultController;
293295
$this->defaultMethod = $routing->defaultMethod;
294296
$this->translateURIDashes = $routing->translateURIDashes;

0 commit comments

Comments
 (0)