Skip to content

Changed $_REQUEST usage to $_POST usage in handle_notepad_update()#470

Merged
sboisvert merged 1 commit intoAutomattic:masterfrom
TheCrowned:update/dashboard-notepad-superglobals
Jun 5, 2018
Merged

Changed $_REQUEST usage to $_POST usage in handle_notepad_update()#470
sboisvert merged 1 commit intoAutomattic:masterfrom
TheCrowned:update/dashboard-notepad-superglobals

Conversation

@TheCrowned
Copy link
Copy Markdown
Contributor

@TheCrowned TheCrowned commented May 30, 2018

The function handle_notepad_update() used to use $_REQUEST, which is against best practices.

Before #469, the form did not specify a method so it defaulted to GET. With #469, we changed the method to POST, so all references to $_REQUEST have been updated with the corresponding $_POST ones.

NOTE that this depends on #469, because it expects the HTML form to use the POST method, or the note saving will just not work.

…pdate(). This expects the HTML form to use the POST method.
@sboisvert
Copy link
Copy Markdown
Contributor

Looks good, great commit message!

One thing that we could add is that it might be useful in the note to state what commit / PR # this depends on. (It's can be deduced from the rest of the text that it depends on #469 but it could be useful to have really stand out so folks skimming it quickly still catch it.

@TheCrowned
Copy link
Copy Markdown
Contributor Author

All right - I have added the mention to the other PR on which this one depends on :)

@rinatkhaziev rinatkhaziev added this to the 0.8.3 milestone Jun 4, 2018
@sboisvert sboisvert merged commit 69af79b into Automattic:master Jun 5, 2018
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

Successfully merging this pull request may close these issues.

3 participants