mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-13 22:06:51 +08:00
Fix yii\base\Controller::bindInjectedParams() to not throw error when argument of ReflectionUnionType
type is passed (#18869)
This commit is contained in:
@ -226,7 +226,7 @@ class Controller extends \yii\base\Controller
|
||||
}
|
||||
$args[] = $actionParams[$key] = $params[$key];
|
||||
unset($params[$key]);
|
||||
} elseif (PHP_VERSION_ID >= 70100 && ($type = $param->getType()) !== null && !$type->isBuiltin()) {
|
||||
} elseif (PHP_VERSION_ID >= 70100 && ($type = $param->getType()) !== null) {
|
||||
try {
|
||||
$this->bindInjectedParams($type, $name, $args, $requestedParams);
|
||||
} catch (\yii\base\Exception $e) {
|
||||
|
Reference in New Issue
Block a user