fix #69628: complex GLOB_BRACE fails on Windows#1278
Merged
php-pulls merged 4 commits intophp:masterfrom May 21, 2015
Merged
Conversation
Contributor
|
I've tested your branch and it looks fine. I'll merge it next days if there are no other comments. One thing you probably should add to the test is a skipif for the case there's no GLOB_BRACE. Thanks. |
Member
Author
|
Good point; I've added the SKIPIF. I've noticed that a respective SKIPIF is missing for glob_variation.phpt – shall I make a separate PR and file a bug report? |
Contributor
|
Ah, good catch. I'd say a new PR isn't necessary, that test is still about the same topic. Cheers. |
Member
Author
|
Fine. 😄 |
Contributor
|
Merged and pushed into 5.5+ as well. Thanks for your work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem is that
plis advanced topmafter an opening bracket has been encountered, so the characters before the last opening bracket are ignored. This might be a deliberate design decision (allow only one bracketed expression inside a braced alternative), but it looks more like a bug. Furthermore multiple bracketed expressions inside a braced alternative seem to be supported by *nix implementations.The suggested patch solves this by using another temporary variable (
pb) to mark the position of the most recent left bracket.With regard to bug69628.phpt: I copied sort_var_dump() from glob_basic.phpt and used it, even though sorting should happen automatically unless GLOB_NOSORT is used.