We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a98bde1 commit 2c331f5Copy full SHA for 2c331f5
1 file changed
system/Router/AutoRouter.php
@@ -127,13 +127,16 @@ public function getRoute(string $uri): array
127
$methodName = strtolower($this->methodName());
128
129
foreach ($this->protectedControllers as $controllerInRoute) {
130
- if (is_string($controllerInRoute)) {
131
- if (strtolower($controllerInRoute) === $controller) {
132
- throw new PageNotFoundException(
133
- 'Cannot access the controller in a CLI Route. Controller: ' . $controllerInRoute
134
- );
135
- }
+ if (! is_string($controllerInRoute)) {
+ continue;
136
}
+ if (strtolower($controllerInRoute) !== $controller) {
+ }
+
137
+ throw new PageNotFoundException(
138
+ 'Cannot access the controller in a CLI Route. Controller: ' . $controllerInRoute
139
+ );
140
141
142
0 commit comments