diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index ee56e5891c8..bf2ad457c1f 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,7 +1,12 @@ Yii Framework 2 Change Log ========================== -2.0.16 under development +2.0.49 + +- Bug #20159: Fixed chroot resolve null route (gozoro) + + +2.0.16 January 31, 2019 ------------------------ - Bug #16903: Fixed 'yii\validators\NumberValidator' method 'isNotNumber' returns false for true/false value (annechko) diff --git a/framework/console/Request.php b/framework/console/Request.php index be76ff4cf46..701e1a930c2 100644 --- a/framework/console/Request.php +++ b/framework/console/Request.php @@ -64,7 +64,7 @@ public function resolve() if ($route === '--') { $endOfOptionsFound = true; - $route = array_shift($rawParams); + $route = (string)array_shift($rawParams); } } else { $route = ''; diff --git a/tests/framework/console/RequestTest.php b/tests/framework/console/RequestTest.php index 796741da673..8cea78bdd1b 100644 --- a/tests/framework/console/RequestTest.php +++ b/tests/framework/console/RequestTest.php @@ -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: `--