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 #73

Merged
merged 2 commits into from
Aug 4, 2023

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 183f7c25f7a35f42abd202b4d012d146f3008edd-PR-73

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • 49 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 56.926%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Admin/Settings.php 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/Admin/Settings.php 49 0%
Totals Coverage Status
Change from base Build 6f81e4fdf3dce9bd0ef7c5c0299f240d8d96f157: 0.0%
Covered Lines: 1500
Relevant Lines: 2635

💛 - Coveralls

@markkelnar markkelnar self-requested a review August 4, 2023 16:48
Copy link
Contributor

@markkelnar markkelnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jasonbahl jasonbahl merged commit 66d8c55 into main Aug 4, 2023
20 of 22 checks passed
@jasonbahl jasonbahl deleted the fix/#69-FILTER_SANITIZE_STRING-deprecated branch January 24, 2024 20:03
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
3 participants