• Resolved wpadmi

    (@wpadmi)


    Hello,
    We got an error on the website, in your WP RSS Aggregator plugin (V 4.23.13):

    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.php

    For 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));

    and

    Line 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 to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Hendra Setiawan

    (@hendcorp)

    Hi @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, 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.