mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-16 03:28:56 +08:00
Fix #18909: Fix bug with binding default action parameters for controllers
This commit is contained in:
@@ -226,7 +226,12 @@ class Controller extends \yii\base\Controller
|
||||
}
|
||||
$args[] = $actionParams[$key] = $params[$key];
|
||||
unset($params[$key]);
|
||||
} elseif (PHP_VERSION_ID >= 70100 && ($type = $param->getType()) !== null) {
|
||||
} elseif (
|
||||
PHP_VERSION_ID >= 70100
|
||||
&& ($type = $param->getType()) !== null
|
||||
&& $type instanceof \ReflectionNamedType
|
||||
&& !$type->isBuiltin()
|
||||
) {
|
||||
try {
|
||||
$this->bindInjectedParams($type, $name, $args, $requestedParams);
|
||||
} catch (\yii\base\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user