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

Closed
ned-bs opened this issue Jul 19, 2023 · 4 comments · Fixed by #2768
Closed

FILTER_SANITIZE_STRING warning #2588

ned-bs opened this issue Jul 19, 2023 · 4 comments · Fixed by #2768
Assignees
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
Contributor

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.

@theavijitsarkar
Copy link

Kindly fix this, this is causing a mayhem in my debug log file

@layoutd
Copy link
Contributor

layoutd commented Jul 17, 2024

👋🏻 @ned-bs @WouterBossen @theavijitsarkar
This issue has been addressed and the fix should be included in next week's release.

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants