• Resolved mativve

    (@mativve)


    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

    (@danielealessandra)

    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:

    $screen_name = filter_var( $_GET["page"], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH );

    To this:

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