• Resolved mugseem

    (@mugseem)


    Hi,

    After updating to 3.3.0 I’m having this error – Warning: preg_match(): Unknown modifier ‘2’ in /wp-content/plugins/defender-security/src/component/user-agent-lockout.php on line 113. I rolled back to 3.2.0 and everything works as it should.

    The line 113 reads – $allowlist_match = preg_match( $allowlist_regex_pattern, $user_agent );

    How can I fix this, please? WordPress 6.0.2, PHP 8.0.23.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @mugseem,

    We already have a fix for this in the next release. The issue is caused due to User-agent added in the blocklist/allowlist where the useragent name has “/” in it.

    For the timebeing you can update such user agents as follows, ie for example, if the user agent added is;
    post/2

    You can update the above to:
    post\/2

    I hope the above helps. Please do let us know if you have any further queries.

    Kind Regards,
    Nithin

    Thread Starter mugseem

    (@mugseem)

    Thank you, @wpmudevsupport11.

    I’m not good at PHP, so I’ll wait for the next update.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘preg_match(): Unknown modifier’ is closed to new replies.