Title: Deprecated FILTER_SANITIZE_STRING
Last modified: May 6, 2025

---

# Deprecated FILTER_SANITIZE_STRING

 *  Resolved [wpadmi](https://wordpress.org/support/users/wpadmi/)
 * (@wpadmi)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/deprecated-filter_sanitize_string-2/)
 * Hello, 
   We got an error on the website, in your **WP RSS Aggregator** plugin (
   V 4.23.13):
 *     ```wp-block-code
       Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /var/www/html/wp-content/plugins/wp-rss-aggregator/src/Handlers/FeedTemplates/PreviewTemplateRedirectHandler.php on line 67 Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-content/plugins/wp-rss-aggregator/src/Handlers/FeedTemplates/PreviewTemplateRedirectHandler.php:67) in /var/www/html/wp-includes/pluggable.php on line 1450 Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-content/plugins/wp-rss-aggregator/src/Handlers/FeedTemplates/PreviewTemplateRedirectHandler.php:67) in /var/www/html/wp-includes/pluggable.php on line 1453
       ```
   
 * 
   Although this error is Deprecated, **FILTER_SANITIZE_STRING**, which is used
   in this plugin, **is no longer supported in higher versions of PHP 8.1+ and can
   cause an error as in this case**.We solved it with a temporary fix in this file/
   var/www/html/wp-content/plugins/wp-rss-aggregator/src/Handlers/FeedTemplates/
   PreviewTemplateRedirectHandler.phpFor the fix, we used the recommended function
   from WP, namely sanitize_text_field.Line 67:$previewId = filter_input(INPUT_GET,
   $this->getParam, FILTER_SANITIZE_STRING);We replaced:$previewId = sanitize_text_field(
   filter_input(INPUT_GET, $this->getParam));andLine 87:$options = filter_input(
   INPUT_GET, ‘wpra_template_options’, FILTER_SANITIZE_STRING);We substituted for:
   $options = sanitize_text_field(filter_input(INPUT_GET, ‘wpra_template_options’));
 * Please update your plugin to stop this error from occurring.
 * Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdeprecated-filter_sanitize_string-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Hendra Setiawan](https://wordpress.org/support/users/hendcorp/)
 * (@hendcorp)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/deprecated-filter_sanitize_string-2/#post-18453823)
 * Hi [@wpadmi](https://wordpress.org/support/users/wpadmi/)
 * Thank you for reaching out and for sharing the details along with your temporary
   fix! We really appreciate your proactive approach.
 * The PHP deprecation notices you’ve encountered with `FILTER_SANITIZE_STRING` 
   are indeed a known issue. While Aggregator 4.x has addressed several compatibility
   challenges over time, we’re aware that some PHP 8.1+ deprecation warnings remain
   unresolved, particularly with deprecated constants like this one.
 * I’m happy to share that we’re actively developing [Aggregator v5](https://www.wprssaggregator.com/v5-update/),
   which will offer full compatibility with PHP 8.x. This major update is a complete
   rewrite of the plugin and will include extensive fixes and improvements to ensure
   smooth performance with newer PHP versions.
 * Thanks again for taking the time to report this, and please don’t hesitate to
   reach out if there’s anything else we can assist with.

Viewing 1 replies (of 1 total)

The topic ‘Deprecated FILTER_SANITIZE_STRING’ is closed to new replies.

 * ![](https://ps.w.org/wp-rss-aggregator/assets/icon-256x256.gif?rev=3157090)
 * [RSS Aggregator - RSS Import, News Feeds, Feed to Post, and Autoblogging](https://wordpress.org/plugins/wp-rss-aggregator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rss-aggregator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rss-aggregator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rss-aggregator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rss-aggregator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rss-aggregator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Hendra Setiawan](https://wordpress.org/support/users/hendcorp/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/deprecated-filter_sanitize_string-2/#post-18453823)
 * Status: resolved