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

Illegal return statement #60

Closed
michaelbourne opened this issue Jun 22, 2024 · 1 comment
Closed

Illegal return statement #60

michaelbourne opened this issue Jun 22, 2024 · 1 comment

Comments

@michaelbourne
Copy link
Contributor

Describe the bug
I'm seeing an Uncaught SyntaxError: Illegal return statement coming from pmprolpv.js line 32: eval( response.data );

This seems to be linked to both:
https://github.com/strangerstudios/pmpro-limit-post-views/blob/dev/includes/restriction.php#L53
https://github.com/strangerstudios/pmpro-limit-post-views/blob/dev/includes/restriction.php#L61

To Reproduce
I'm testing as a registered user with a free account that has post views limited. This error occurs when I'm redirected to the LPV page, or on some other random pages all the time like the home page.

Screenshots
image

Expected behavior
The JSON sent back to eval should probably be blank?

WordPress Environment

``` LPV 1.0 ```
@dparker1005
Copy link
Member

Fixed in v1.0.1 by #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants