• Resolved therealgilles

    (@chamois_blanc)


    Please fix this PHP 8.1 warning:

     PHP Deprecated:  Constant FILTER_SANITIZE_STRING is deprecated in .../wp-content/plugins/the-events-calendar/common/src/functions/utils.php on line 1130
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Victor Zarranz

    (@vicskf)

    Hi @chamois_blanc,

    Thanks for taking time to report this.

    We are aware of this deprecation with PHP 8.1 so I’m going to link this thread to our internal bug report so we can let you know once we release a version with a fix.

    Best!

    Internal Ref: BTRIA-1611

    Thread Starter therealgilles

    (@chamois_blanc)

    Could we provide a temporary fix for it? It’s filling up my Rollbar warnings and going over quota.

    Plugin Support Darian

    (@d0153)

    Hi @chamois_blanc

    For now, you could downgrade your PHP to 8.0 as The Events Calendar offers better compatibility with it.

    Thread Starter therealgilles

    (@chamois_blanc)

    Downgrading to PHP 8.0 is not an option. Please ask the developers what they will replace it with. This stackoverflow entry details some of the options: https://stackoverflow.com/questions/69207368/constant-filter-sanitize-string-is-deprecated

    Would this polyfill do the job?

    function filter_string_polyfill(string $string): string
    {
        $str = preg_replace('/\x00|<[^>]*>?/', '', $string);
        return str_replace(["'", '"'], [''', '"'], $str);
    }
    Plugin Support Abz

    (@abzlevelup)

    Hi @chamois_blanc, sorry to hear that downgrading is not an option for you as a workaround. Let me check with our devs, and we’ll get back to you as soon as we hear from them.

    Hang in there.

    Internal Bug Ticket Reference:
    BTRIA-1611

    Plugin Support Darian

    (@d0153)

    Hi @chamois_blanc

    Thanks for patiently waiting.

    Unfortunately, we could not provide any other workaround except by downgrading your PHP to 8.0. But rest assured, we are working on making our plugins compatible with PHP 8.1

    See known issues here and our PHP 8.1 Support article.

    We already created an internal bug ticket [BTRIA-1611] and added a note of this error you sent. While we don’t have an ETA, you’ll get notified once there is an update and fix.

    Please let me know if you have further questions or concerns.

    Plugin Support Guga Alves

    (@gugaalves)

    Hi @chamois_blanc,

    We’re back with good news, the FILTER_SANITIZE_STRING and deprecated PHP functions issues were fixed on Version 6.0.12, improving PHP 8.1 compatibility.

    Please update the plugin to apply that fix in your websites.

    Best regards,

    Plugin Support Darian

    (@d0153)

    Hi @chamois_blanc

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated’ is closed to new replies.