Skip to content

Promote warnings to exceptions in ext/pcre #6006

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kocsismate
Copy link
Member

No description provided.

Copy link
Member Author

@kocsismate kocsismate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus question: should we treat regex compilation errors as an exception?

@nikic
Copy link
Member

nikic commented Aug 25, 2020

I don't think we'll want to do these changes. As we don't have a dedicated function to validate a regular expression, doing a preg_match() on dummy input and checking for false is the way to do so now, and this PR would break it -- while an invalid regex itself would still return false, invalid modifiers (that are also part of the regex) would throw, etc.

@php-pulls php-pulls closed this in ea87d04 Aug 25, 2020
@kocsismate kocsismate deleted the pcre-warning branch August 25, 2020 16:11
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.

3 participants