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

Cannot activate - Parse error: syntax error #51

Open
dartrax opened this issue Apr 23, 2022 · 7 comments
Open

Cannot activate - Parse error: syntax error #51

dartrax opened this issue Apr 23, 2022 · 7 comments

Comments

@dartrax
Copy link

dartrax commented Apr 23, 2022

Hi,
I cannot activate this plugin:

Parse error: syntax error, unexpected token "default", expecting "elseif" or "else" or "endif" in /var/www/vhosts/.../wp-content/plugins/Tooltipy-OOP-master/admin/class-settings.php on line 607

@lebleut
Copy link
Owner

lebleut commented May 2, 2022

Hi @dartrax
Thanks for letting me know, I tried to reproduce the error here with no chance
Plz tell me which PHP version and server are you using ?

@dartrax
Copy link
Author

dartrax commented May 2, 2022

Tested with PHP version 8.0.18 and 8.1.5, Apache server, and PHP 7.4.7 on a local XAMPP stack (Windows). All the same.
I also do had 500 server errors with the current non-OOP version available at Wordpress plugin repository, but I thought I'd rather give this new version a try.

@dartrax
Copy link
Author

dartrax commented May 6, 2022

Please let me know if I can do anything to help you debugging this!

@lebleut
Copy link
Owner

lebleut commented May 6, 2022

Ok @dartrax checking now

@lebleut
Copy link
Owner

lebleut commented May 6, 2022

I did with both versions, and with PHP 7 and 8 (Apache)
All good
there maybe a change you did on the code my guess
please remove the whole Tooltipy-OOP directory
then test again by downloading from here : https://github.com/lebleut/Tooltipy-OOP/archive/refs/heads/master.zip
and see

@dartrax
Copy link
Author

dartrax commented May 6, 2022

I've downloaded the zip and first tried to upload it via Wordpress, second via FTP upload. Both times same error.

What puzzles me is that I get the same error if I load the class-settings.php in VSCode and hit "Run and Debug". This was merely accidental since I don't expect this single file to work there at all, but the message is the same.

image

@dartrax
Copy link
Author

dartrax commented May 6, 2022

In VSCode it goes away when I remove the colon in Line 587...
Actually, I can activate the plugin successfully after removing this colon.
However, VSCode detects a syntax error when not debugging:
image

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