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 f2ea9be commit e67e3de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Yii Framework 2 Change Log
- New #20137: Added `yii\caching\CallbackDependency` to allow using a callback to determine if a cache dependency is still valid (laxity7)
- Enh #20134: Raise minimum `PHP` version to `7.3` (@terabytesoftw)
- Bug #20141: Update `ezyang/htmlpurifier` dependency to version `4.17` (@terabytesoftw)
- Bug #20159: Fixed chroot resolve null route (gozoro)

2.0.49.2 October 12, 2023
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion framework/console/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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 instead of route
'params' => [
'--', // Special argument "End of Options"
],
'expected' => [
'route' => '',
'params' => [],
],
],
// Case: `--<option> <value>` and `-<alias> <value>` syntax
[
Expand Down

0 comments on commit e67e3de

Please sign in to comment.