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

FILTER_SANITIZE_STRING warning #2588

Open
ned-bs opened this issue Jul 19, 2023 · 2 comments
Open

FILTER_SANITIZE_STRING warning #2588

ned-bs opened this issue Jul 19, 2023 · 2 comments
Labels
compatibility type: technical debt This issue/PR represents/solves the technical debt of the project.

Comments

@ned-bs
Copy link

ned-bs commented Jul 19, 2023

Hi there,

This plugin uses the deprecated ( as of PHP 8.1.0 ) \facebook-for-woocommerce\includes\Framework\Helper.php line 141 and also lne 143.

According to PHP.net it should be replaced with htmlspecialchars() – https://www.php.net/manual/en/function.htmlspecialchars.php

Looking forward to an update on this issue.

Thank you!

public static function str_to_ascii( $string ) { // strip ASCII chars 32 and under $string = filter_var( $string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW ); // strip ASCII chars 127 and higher return filter_var( $string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH ); }

@layoutd layoutd added compatibility type: technical debt This issue/PR represents/solves the technical debt of the project. labels Jul 20, 2023
@layoutd
Copy link
Collaborator

layoutd commented Jul 20, 2023

Thanks for the report @bsahins, we'll update here when the fix is released.

@WouterBossen
Copy link

Hey guys, any update on this? It's been a year and we're still getting the deprecated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility type: technical debt This issue/PR represents/solves the technical debt of the project.
3 participants