You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected result: calling this action with a single query parameter (like /foo?bar=1) and calling it with an array query parameter (like foo?bar[]=1&bar[]=2) both work.
Actual result: Calling it with an integer parameter works correctly, calling it with an array parameter returns a 400 Bad Request.
I'm pretty sure the problem lies with this portion of yii\web\Controller::bindActionParams (line 136 and onwards):
Take a
yii\web\Controller
with an example action like this:Expected result: calling this action with a single query parameter (like
/foo?bar=1
) and calling it with an array query parameter (likefoo?bar[]=1&bar[]=2
) both work.Actual result: Calling it with an integer parameter works correctly, calling it with an array parameter returns a 400 Bad Request.
I'm pretty sure the problem lies with this portion of
yii\web\Controller::bindActionParams
(line 136 and onwards):$isArray
does not check for whether$type
is aReflectionUnionType
that includesarray
, hence the array parameter is wrongly rejected.The text was updated successfully, but these errors were encountered: