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

Latest release - errors in text editor #303

Closed
shilpapatil opened this issue Apr 22, 2015 · 24 comments
Closed

Latest release - errors in text editor #303

shilpapatil opened this issue Apr 22, 2015 · 24 comments
Milestone

Comments

@shilpapatil
Copy link

Hi,

TGM-Plugin-Activation v 2.4.1
class-tgm-plugin-activation.php showing errors in code editor.
Please check if these are fine.
screenshot-1
screenshot-2

@GaryJones
Copy link
Member

Any clue what it is complaining about? Obviously some of it is the urlencode() but specifically?

@shilpapatil
Copy link
Author

As per code hinting, these are syntax error.
On code lines with -

  • global object - $GLOBALS['tgmpa']::$instance
  • urlencode() in array

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

@shilpapatil No PHP syntax errors there, probably syntax parser errors in the editor though.

@Jelena1
Copy link

Jelena1 commented Apr 22, 2015

This is what I get when try to install theme:
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/.../class-tgm-plugin-activation.php on line 1140

@shilpapatil
Copy link
Author

This is what I got in editor:
screenshot-3

@AndonDesign
Copy link

What version of PHP are you guys running? The parse error "Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM ..." referencing $GLOBALS['tgmpa']::$instance might be related to a version of PHP lower than PHP 5.3, I encountered similar error on PHP 5.2.17, I believe the lowest WP currently supports is PHP 5.2.4 (https://wordpress.org/about/requirements/)

@goodwinpress
Copy link

I have this problem too - T_PAAMAYIM_NEKUDOTAYIM in /home/.../class-tgm-plugin-activation.php on line 1140
PHP version is 5.2.17

@Jelena1
Copy link

Jelena1 commented Apr 22, 2015

it's 5.3.29 PHP version

@shilpapatil
Copy link
Author

PHP 5.5.12

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

Duh.. of course... I can see the issue with PHP 5.2 and am currently working on a solution.

@shilpapatil are you sure you're running into this with PHP 5.5 ??? I've just ran lints on the file with both PHP 5.5.9 as well as 5.5.16 and passes with flying colours.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

Ok, I send in PR #306 which should fix this. Testing appreciated.

@AndonDesign
Copy link

thanks for the effort @jrfnl. I just tested it on localhost PHP 5.4.16 and got this error:
Fatal error: Call to undefined function get_instance() in .../class-tgm-plugin-activation.php on line 1138
I hope this helps

@goodwinpress
Copy link

Thanks for improving, but there is the same error - get_instance() at 1138 (5.2.17)

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

Yeah, sorry about that. I seem to have had my head elsewhere. All fixed now with my latest commit.

@shilpapatil
Copy link
Author

@jrfnl pardon my ignorance. My editor supports PHP 5.4
Seems like you can ignore my original post, as it is only me who getting those syntax errors :)

@shivapoudel
Copy link
Contributor

@jrfnl can you link the commit?

@AndonDesign
Copy link

Error's gone (thanks) BUT now the link is gone from the menu and there are no notices if I use your latest commit from #306 (40f8a0d)

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

@AndonDesign Yup, I noticed that too, working on it.

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

Ok, fixed it - working fix in PR #309 which will probably be merged into develop soon. Testing still appreciated.

@goodwinpress
Copy link

Thank you!!!

@AndonDesign
Copy link

Not sure if related to latest commit (030bdcc) but now I'm getting the following error when attempting bulk install: Fatal error: Call to undefined method WP_Upgrader::construct() in .../class-tgm-plugin-activation.php on line 1859

@jrfnl
Copy link
Contributor

jrfnl commented Apr 22, 2015

@AndonDesign Thanks for paying attention, I obviously am not, keep making typos today ;-) PR #311 fixes this.

@AndonDesign
Copy link

works a treat now! thanks :)

@shilpapatil
Copy link
Author

Seems like issue is resolved. Hope it is ok to close this thread.
Many Thanks.

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

No branches or pull requests

7 participants