Title: FILTER_SANITIZE_STRING
Last modified: September 12, 2023

---

# FILTER_SANITIZE_STRING

 *  Resolved [mativve](https://wordpress.org/support/users/mativve/)
 * (@mativve)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/filter_sanitize_string-2/)
 * Hello, in my logs in ACP I see error about FILTER_SANITIZE_STRING.
 * PHP Deprecated: FILTER_SANITIZE_STRING is deprecated in <hidden_hosting_path>/
   wp-content/plugins/da-reactions-premium/classes/DaReactions/Admin.php on line
   317
 * On my hosting I have PHP 8.1.
   How can I solve this? Any solution?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Daniele Alessandra](https://wordpress.org/support/users/danielealessandra/)
 * (@danielealessandra)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/filter_sanitize_string-2/#post-17044287)
 * Hello,
 * that constant has been deprecated since PHP 8.1, which means you should receive
   a warning instead of an error.
 * The PHP manual suggests using htmlspecialchars to address this issue, but you
   can also consider using FILTER_UNSAFE_RAW as an alternative solution.
 * Change this:
 *     ```wp-block-code
       $screen_name = filter_var( $_GET["page"], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH );
       ```
   
 * To this:
 *     ```wp-block-code
       $screen_name = filter_var( $_GET["page"], FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘FILTER_SANITIZE_STRING’ is closed to new replies.

 * ![](https://ps.w.org/da-reactions/assets/icon-256x256.png?rev=2106671)
 * [Da Reactions](https://wordpress.org/plugins/da-reactions/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/da-reactions/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/da-reactions/)
 * [Active Topics](https://wordpress.org/support/plugin/da-reactions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/da-reactions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/da-reactions/reviews/)

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Daniele Alessandra](https://wordpress.org/support/users/danielealessandra/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/filter_sanitize_string-2/#post-17044287)
 * Status: resolved