Skip to content

fix: replace filter_input with sanitize_text_field#72

Closed
jasonbahl wants to merge 1 commit intowp-graphql:mainfrom
jasonbahl:fix/#69-FILTER_SANITIZE_STRING-deprecated
Closed

fix: replace filter_input with sanitize_text_field#72
jasonbahl wants to merge 1 commit intowp-graphql:mainfrom
jasonbahl:fix/#69-FILTER_SANITIZE_STRING-deprecated

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

Comments