Why was it set to _GET instead of _REQUEST in the first place? Is there some security thing that I’m not understanding? (Or CHttpRequest->getParam($name))
$_REQUEST includes $_GET, $_POST… and $_COOKIE. So yes, it’s security thing: malicious user can override your variables by setting a cookie with the same name as your $_GET or $_POST parameter.
_REQUEST is evil and should never have been in the language in the first place. It serves no useful purpose whatsoever (unless you consider making things more ambiguous and less secure useful).
It may not be a very good example, but merging these two arrays makes it very easier to try and brute force stuff, as you could put the username and password in the URL and keep blasting. Creating POST requests is a little harder.
Plus I guess I’m not a fan of not knowing precisely where all my variables are coming from. It feels nasty.
Just rethinking this… Since you validate input before using it, does it really matter from which source it comes? I think I understand the different purposes of GET and POST data, but should our actions have to deal with that?
Just for everyone who’s interested in this feature request: Quite some time ago, I wrote a filter that allows pretty flexible configuration of action parameters. Have a look here: https://github.com/bwoester/yii-action-param-filter