Skip to content

Flatten nulls to empty string for preg_match in PropertyModifierRejectOrSelect#2994

Open
afoster wants to merge 2 commits intoIcinga:masterfrom
afoster:ensure-str-for-pregmatch
Open

Flatten nulls to empty string for preg_match in PropertyModifierRejectOrSelect#2994
afoster wants to merge 2 commits intoIcinga:masterfrom
afoster:ensure-str-for-pregmatch

Conversation

@afoster
Copy link
Copy Markdown

@afoster afoster commented Jun 27, 2025

In recent versions of PHP, preg_match() will throw a deprecation notice if null is passed as its $subject string parameter. This change makes matchesRegexp() behave as it would have before when a null was implicitly casted, and is probably what admin users would expect when testing their patterns against a non-existant value versus an empty value.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Jun 27, 2025

Thank you for your pull request. Before we can look at it, you'll need to sign a Contributor License Agreement (CLA).

Please follow instructions at https://icinga.com/company/contributor-agreement to sign the CLA.

After that, please reply here with a comment and we'll verify.

Contributors that have not signed yet: @afoster

Details
  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Please contact us if you think this is the case.

  • If you signed the CLA as a corporation, your GitHub username may not have been submitted to us. Please reach out to the responsible person in your organization.

@afoster
Copy link
Copy Markdown
Author

afoster commented Jun 27, 2025

Hi, CLA signed as @afoster.

@bobapple
Copy link
Copy Markdown
Member

@cla-bot check

@cla-bot cla-bot bot added the cla/signed label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants