Skip to content
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

preg_match throw an warning #6662

Closed
wants to merge 2 commits into from
Closed

preg_match throw an warning #6662

wants to merge 2 commits into from

Conversation

nicolae-stelian
Copy link
Contributor

The line 139 throw an warning: preg_match(): Unknown modifier ']'. Remove from regular expression the "/" character

The line 139 throw an warning: preg_match(): Unknown modifier ']'. Remove from regular expression the "/" character
@wouterj
Copy link
Member

wouterj commented Jun 20, 2016

Can you please replace it with \/ (which also fixes the issue, but still allows the / character)?

status: needs work

@nicolae-stelian
Copy link
Contributor Author

What you think if I write the regex like that ( I think that is more readable) ?
$wsseRegex = '/UsernameToken Username="([^"]+)",'
. ' PasswordDigest="([^"]+)",'
. ' Nonce="([a-zA-Z0-9+/]+={0,2})",'
. ' Created="([^"]+)"/';

@wouterj
Copy link
Member

wouterj commented Jun 20, 2016

To be honest, I don't like concatenation for new lines. We can use the //x flag, but then we need to replace all spaces with \s, which wouldn't help anything with readability.

For now, let's just change it to \/. We can always create a new PR for the line wrapping thing if other maintainers are on your side

@nicolae-stelian
Copy link
Contributor Author

Ok. Thank'you.

@wouterj
Copy link
Member

wouterj commented Jun 20, 2016

👍

status: reviewed

@javiereguiluz
Copy link
Member

👍

@xabbuh
Copy link
Member

xabbuh commented Jun 20, 2016

Good catch, thanks @nicolae-stelian.

xabbuh added a commit that referenced this pull request Jun 20, 2016
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes #6662).

Discussion
----------

preg_match throw an warning

The line 139 throw an warning: preg_match(): Unknown modifier ']'. Remove from regular expression the "/" character

Commits
-------

50f0256 preg_match throw an warning
@xabbuh xabbuh closed this Jun 20, 2016
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.

5 participants