array union in controllers

! fix issue when handling parameter with string type, add according test
This commit is contained in:
Chris Reichel
2025-05-19 12:21:45 +02:00
parent 2b30ec1c9b
commit 848a90dea8
3 changed files with 8 additions and 4 deletions

View File

@ -217,6 +217,9 @@ class Controller extends \yii\base\Controller
return ['', true];
}
if ($typeName === 'string') {
return [$param, true];
}
$filterResult = $this->filterParamByType($param, $typeName);
return [$filterResult, $filterResult !== null];
}