Skip to content

Commit e67e3de

Browse files
author
bolovincev
committed
fix chroot resolve null route
1 parent f2ea9be commit e67e3de

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Diff for: framework/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Yii Framework 2 Change Log
2727
- New #20137: Added `yii\caching\CallbackDependency` to allow using a callback to determine if a cache dependency is still valid (laxity7)
2828
- Enh #20134: Raise minimum `PHP` version to `7.3` (@terabytesoftw)
2929
- Bug #20141: Update `ezyang/htmlpurifier` dependency to version `4.17` (@terabytesoftw)
30+
- Bug #20159: Fixed chroot resolve null route (gozoro)
3031

3132
2.0.49.2 October 12, 2023
3233
-------------------------

Diff for: framework/console/Request.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function resolve()
6565

6666
if ($route === '--') {
6767
$endOfOptionsFound = true;
68-
$route = array_shift($rawParams);
68+
$route = (string)array_shift($rawParams);
6969
}
7070
} else {
7171
$route = '';

Diff for: tests/framework/console/RequestTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ public function provider()
121121
'-alias2=testValue',
122122
],
123123
],
124+
],
125+
[
126+
// Case: Special argument "End of Options" placed instead of route
127+
'params' => [
128+
'--', // Special argument "End of Options"
129+
],
130+
'expected' => [
131+
'route' => '',
132+
'params' => [],
133+
],
124134
],
125135
// Case: `--<option> <value>` and `-<alias> <value>` syntax
126136
[

0 commit comments

Comments
 (0)