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

fix invalid sql in assign-user-to-coauthor subcommand #1074

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jkeasley
Copy link

@jkeasley jkeasley commented Nov 1, 2024

Description

ensure that the list of post-types is correctly wrapped in single quotes to ensure that the resulting sql is valid.

currently $post_types evaluates to post','page resulting in an invalid sql query, after the change $post_type will evaluate to 'post','page' with is the expected syntax for this sql query

Deploy Notes

N/A

Steps to Test

Run wp co-authors-plus assign-user-to-coauthor --user_login=<user_login> --coauthor=<cap-user_login> confirm that the command executes as expected without the error WordPress database error You have an error in your SQL syntax; being returned

ensure that the list of post-types is correctly wrapped in single quotes to ensure that the resulting sql is valid.

currently $post_types evaluates to `post','page` resulting in an invalid sql query, after the change $post_type will evaluate to `'post','page'` with is the expected syntax for this sql query
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.

1 participant