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

Syntax error in latest version #5

Closed
autarch opened this issue Sep 10, 2014 · 3 comments
Closed

Syntax error in latest version #5

autarch opened this issue Sep 10, 2014 · 3 comments
Assignees
Labels

Comments

@autarch
Copy link
Contributor

autarch commented Sep 10, 2014

I'm getting this:

PHP Parse error:  syntax error, unexpected '[' in /var/www/admin.exploreveg.org/wp-content/plugins/credit-tracker/options.php on line 97

Line 97 for me is:

if (in_array($screen->id, [$plugin_screen_hook_suffix, 'attachment', 'upload'])) {
    wp_enqueue_script(CT_SLUG . '-admin-script', plugins_url('js/ct-admin.js', __FILE__), array('jquery'), CT_VERSION);
}
@autarch
Copy link
Contributor Author

autarch commented Sep 10, 2014

php --version
PHP 5.3.10-1ubuntu3.13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:54:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

@autarch
Copy link
Contributor Author

autarch commented Sep 10, 2014

I hotfixed this by editing the file and reverting back to the old if statement:

if ($screen->id == $plugin_screen_hook_suffix) {

@r-brown r-brown added the bug label Sep 10, 2014
@r-brown r-brown self-assigned this Sep 10, 2014
@r-brown
Copy link
Member

r-brown commented Sep 10, 2014

Hi Dave,

Thank you for your feedback & sorry for the inconvenience!!!
This issue has been resolved now. Please consider to upgrade to the version 1.0.1
http://wordpress.org/plugins/credit-tracker/

Best Regards,
R.Brown

@r-brown r-brown closed this as completed Sep 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants