-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fixed bug #68128 #865
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
Fixed bug #68128 #865
Conversation
👍 |
How to fix this in prior PHP versions (by extending the |
@Hywan When you extend
|
@Hywan This patch can easily be back ported to earlier versions. |
@datibbaw Exactly, it fixes the issue and tests are green again. Thanks! |
Now, HHVM has the same bug… |
cc @SiebelsTim |
I've asked the list to review the code changes; if all is well, it will be merged by the end of this week. |
Is the documentation need to be updated? |
@Hywan Could you log a separate Doc bug for that? The PCRE constants are declared on |
@datibbaw On Github or on edit.php.net? |
What are the chances that this pull request will be accepted? And, if it is, in what PHP versions would the fix be incorporated? Thanks. |
@Tyrael ping! do you reckon this should be back ported to 5.6? |
Three issues are addressed: - RecursiveRegexIterator::accept() should accept non-empty arrays without applying any regular expression and RegexIterator::accept() should not accept an array. - RegexIterator::accept() should not accept an atom that fails to match anything, even when PREG_PATTERN_ORDER is used (which would return an array of empty arrays). - RecursiveRegexIterator::getChildren() should pass all constructor arguments to its child iterator instead of just the regular expression.
@datibbaw I would be fine having it in 5.6 |
In case USE_KEY flag is active, RegexIterator->accept() should keep it's old behavior which is to accept keys mapping arrays. This broke after PHP 5.5 but was not noticed due to lack of tests for USE_KEY.
In case USE_KEY flag is active, RegexIterator->accept() should keep it's old behavior which is to accept keys mapping arrays. This broke after PHP 5.5 but was not noticed due to lack of tests for USE_KEY.
In case USE_KEY flag is active, RegexIterator->accept() should keep it's old behavior which is to accept keys mapping arrays. This broke after PHP 5.5 but was not noticed due to lack of tests for USE_KEY.
* master: Removed impossible condition fix bug related to php#865 Fix bug #69579 Fix bug #69579 update NEWS update NEWS Fixed bug #73126 Cannot pass parameter 1 by reference Limit size of result set for test query update NEWS PHP bug 67130: nextRowset should work with unfetched rows Move dtor before memory freed to avoid invalid read Fixed skip Skip failing FreeType tests for now
Fixes an issue that's been around since d81ea16.
Three issues are addressed:
RecursiveRegexIterator::accept()
should accept non-empty arrays without applying any regular expression andRegexIterator::accept()
should not accept an array.RegexIterator::accept()
should not accept an atom that fails to match anything, even whenPREG_PATTERN_ORDER
is used (which would return an array of empty arrays).RecursiveRegexIterator::getChildren()
should pass all constructor arguments to its child iterator instead of just the regular expression.