Fix yii\base\Controller::bindInjectedParams() to not throw error when argument of ReflectionUnionType type is passed (#18869)

This commit is contained in:
Bizley
2021-09-06 20:16:14 +02:00
committed by GitHub
parent 932806b97d
commit ea60fba0ae
4 changed files with 7 additions and 2 deletions

View File

@ -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) {