Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Add check for comments that exceed DB col size - #2858

#2858
Open
salcode wants to merge 2 commits into
WP-API:developWP-API/WP-API:developfrom
salcode:2785-comment-exceed-db-col-sizeCopy head branch name to clipboard
Open

Add check for comments that exceed DB col size#2858
salcode wants to merge 2 commits into
WP-API:developWP-API/WP-API:developfrom
salcode:2785-comment-exceed-db-col-sizeCopy head branch name to clipboard

Conversation

@salcode

@salcode salcode commented Oct 18, 2016

Copy link
Copy Markdown

Add checks for these fields exceeding the DB col size and tests for each
field:

  • comment_author
  • comment_author_email
  • comment_author_url
  • comment_content

See #2785

Add checks for these fields exceeding the DB col size and tests for each
field:

- comment_author
- comment_author_email
- comment_author_url
- comment_content

See #2785
@salcode

salcode commented Oct 18, 2016

Copy link
Copy Markdown
Author

CONTRIBUTING.md asks that I leave a #reviewmerge comment, which I'm not familiar with. Hopefully, this comment with the hash tag is sufficient. If not, I'd appreciate any guidance (or a relevant link) on how to add this properly.

Thanks.

@rachelbaker

Copy link
Copy Markdown
Member

@salcode What do you think about moving this into the prepare_item_for_database() method so we are covered on create & update actions?

@rachelbaker

Copy link
Copy Markdown
Member

This PR would also benefit from a few unit tests.

@rachelbaker rachelbaker added this to the 2.0 milestone Oct 19, 2016
@schlessera

Copy link
Copy Markdown
Member

@rachelbaker, the original PR already includes the corresponding unit tests.

Move check for comments that exceed DB col size from method
create_item() to prepare_item_for_database().

This allows the check to be performed on both comment create and update
rather than just on create.

See #2785
See #2858
@salcode

salcode commented Oct 20, 2016

Copy link
Copy Markdown
Author

@rachelbaker thanks for your suggestion. I've moved the DB column size check to prepare_item_for_database() so as to cover both create and update.

Currently, there are unit tests for create. Am I correct you're suggesting we add tests to cover update?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.