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: replace filter_input with sanitize_text_field #72

Conversation

jasonbahl
Copy link
Contributor

What does this implement/fix? Explain your changes.

This replaces the filter_input function with sanitize_text_field when verifying the nonce for checking Admin Location Rules when ACF Field Group pages are loaded or various settings of the field group are modified.

The FILTER_SANITIZE_STRING argument was deprecated in php 8.1

Does this close any currently open issues?

closes #69

Any other comments?

With ACF Pro v6.1.7, WPGraphQL 1.14.9 and WPGraphQL for ACF (v2.0.0-beta.3.1.0) active, when opening the admin page for an ACF Field Group:

Before

The following error message would be displayed in the console in response to the AJAX method to check the graphql location rules:

CleanShot 2023-08-03 at 16 52 19

After

The error message is no longer returned:

CleanShot 2023-08-03 at 16 52 40

@jasonbahl jasonbahl self-assigned this Aug 3, 2023
@jasonbahl
Copy link
Contributor Author

Closing PR as tests fail when a PR is opened from a fork

@jasonbahl jasonbahl closed this Aug 3, 2023
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.

FILTER_SANITIZE_STRING deprecated
1 participant