Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 5b70272

Browse files
committed
clean resolved controller in sandbox
1 parent fe827fc commit 5b70272

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Server/Sandbox.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ protected function rebindRouterContainer($application)
9898
$router = $application->make('router');
9999
$closure = function () use ($application) {
100100
$this->container = $application;
101+
if (! isset($application['request'])) {
102+
return;
103+
}
104+
$route = $this->routes->match($application['request']);
105+
// clear resolved controller
106+
if (property_exists($route, 'container')) {
107+
$route->controller = null;
108+
}
101109
};
102110

103111
$resetRouter = $closure->bindTo($router, $router);

0 commit comments

Comments
 (0)