Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce/eliminate usage of $_REQUEST throughout the plugin #6

Open
stevegrunwell opened this issue Jul 13, 2015 · 0 comments
Open

Reduce/eliminate usage of $_REQUEST throughout the plugin #6

stevegrunwell opened this issue Jul 13, 2015 · 0 comments

Comments

@stevegrunwell
Copy link
Contributor

Automattic (specifically WordPress.com VIP) dissuades the use of $_REQUEST in plugins and themes:

$_REQUEST should never be used because it is hard to track where the data is coming from (was it POST, or GET, or a cookie?), which makes reviewing the code more difficult. Additionally, it makes it easy to introduce sneaky and hard to find bugs, as any of the aforementioned locations can supply the data, which is hard to predict.

Much better to be explicit and use either $_POST or $_GET instead.

I made a pass at cleaning this up in #4, but at that point it was going to interfere with the work going on in the add/fallback-methods branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants