Skip to content

Commit 0d53a13

Browse files
committed
Empty router not suppoted. Use as param
1 parent eea99bb commit 0d53a13

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Router.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ public function getController(\Swoole\Http\Response $response): Controller {
8686
$action = $this->action;
8787
$v = $this->version ?? '';
8888
do {
89+
if (in_array('', $action, true)) {
90+
// Empty router not suppoted. Use as param
91+
$par[] = array_pop($action);
92+
continue;
93+
}
8994
$tmp = $action;
9095
$tmp[] = $this->method . $v;
9196

0 commit comments

Comments
 (0)