PHP Warning: Undefined variable $matches

Home Forums BulletProof Security Pro PHP Warning: Undefined variable $matches

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #41716
    protection
    Participant

    Hello –

    When upgrading my PHP version from 7.4 to 8.0, I get the following warning:

    PHP Warning: Undefined variable $matches in /home/xxxxxxx/public_html/wp-content/plugins/bulletproof-security/includes/db-security.php on line 469

    I also get this if trying to switch to PHP 8.1. I noticed this thread from years ago, but it seems like it was fixed since then.

    I’m using WordPress version 5.9.2, and BPS Pro 16.5. This also happened with BPS Pro 16.4.

    Thanks

    EDIT: I came across this doc from the PHP 8.0 manual. On that page if you search for the text “A number of notices have been converted into warnings:“, you’ll see that the reason this warning is appearing now is because it’s been elevated from a notice to a warning.

    #41717
    AITpro Admin
    Keymaster

    Thanks for pointing this php error out.  This php error is insignificant.  So nothing to worry about.  This php error will be fixed in the next BPS Pro version release.

    Yep, PHP 8 and 8.1 have significantly increased checking for absolute “code correctness”.  I just happened to miss this one and I’m sure there will be others that I missed.  😉

    #41718
    protection
    Participant

    Thanks so much! Your response time never ceases to amaze me!

    #41727
    protection
    Participant

    Out of curiosity, is there a setting that I can change so that this doesn’t get triggered? If so, is this an important to have enabled?

    #41728
    AITpro Admin
    Keymaster

    That code has to do with the DB Monitor Alert.  The php error is completely insignificant.  You can change this option setting if the php error is bothering you > BPS Pro > Display & Alert Options > Database Monitor: DBM Alerts > choose > Turn Off Displayed Alerts.

    #41729
    protection
    Participant

    Perfect, thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.