Skip to content

Commit

Permalink
fix chroot resolve null route
Browse files Browse the repository at this point in the history
  • Loading branch information
bolovincev committed May 16, 2024
1 parent 324884a commit cfc8501
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion framework/console/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function resolve()

if ($route === '--') {
$endOfOptionsFound = true;
$route = array_shift($rawParams);
$route = (string)array_shift($rawParams);
}
} else {
$route = '';
Expand Down
10 changes: 10 additions & 0 deletions tests/framework/console/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ public function provider()
'-alias2=testValue',
],
],
],
[
// Case: Special argument "End of Options" placed insted route
'params' => [
'--' // Special argument "End of Options"
],
'expected' => [
'route' => '',
'params' => [],
],
],
// Case: `--<option> <value>` and `-<alias> <value>` syntax
[
Expand Down

0 comments on commit cfc8501

Please sign in to comment.