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

PHP Warning: preg_match(): Compilation failed: missing ) at offset #1054

Closed
raamdev opened this issue Feb 17, 2017 · 4 comments
Closed

PHP Warning: preg_match(): Compilation failed: missing ) at offset #1054

raamdev opened this issue Feb 17, 2017 · 4 comments
Labels
Milestone

Comments

@raamdev
Copy link
Contributor

raamdev commented Feb 17, 2017

The following was reported in the community forum:

mod_fcgid: stderr: PHP Warning: preg_match(): Compilation failed: missing ) at offset 309 in /AppBuzzinga.com/httpdocs/wp-content/plugins/s2member/src/includes/classes/custom-reg-fields.inc.php on line 696, referer: https://appbuzzinga.com/?s2member_profile=1

Here's that line in the source code:
https://github.com/websharks/s2member/blob/161129/src/includes/classes/custom-reg-fields.inc.php#L696

It looks like this is what's causing the problem:

preg_match($non_personal_email_users, $input[$_field_var])

The "Compilation failed: missing ) at offset" warning is likely being thrown because of special characters in $input[$_field_var] that are not being escaped properly. I think we should be using preg_quote() there.

@jaswsinc Can you confirm?

@raamdev raamdev added the bug label Feb 17, 2017
@jaswrks
Copy link
Contributor

jaswrks commented Feb 17, 2017

@jaswrks
Copy link
Contributor

jaswrks commented Feb 17, 2017

@jaswrks
Copy link
Contributor

jaswrks commented Feb 17, 2017

@raamdev
Copy link
Contributor Author

raamdev commented Feb 17, 2017

@jaswsinc Ah, cool. Thank you. I didn't realize that was the same issue. I'll update the changelog for the next release to mention this issue and mark this as closed.

@raamdev raamdev closed this as completed Feb 17, 2017
@raamdev raamdev added this to the Next Release milestone Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants