Support » Plugin: cookieBAR » Error when trying to activate

  • Resolved miealex

    (@miealex)


    [24-Jul-2018 22:03:34] PHP Parse error: syntax error, unexpected '[' in /......./public_html/wp-content/plugins/cookiebar/cookiebar-wp.php on line 65

    On

    wp_enqueue_script(
            'cookieBAR',
            plugins_url('cookiebar-latest.min.js', __FILE__) . $params,
            [],
            '1.6.1',
            false
        );

    After removing [], all is OK.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author tox82

    (@tox82)

    Hello @miealex, which PHP version are you using?

    Php v 5.6 with suphp.

    And I think that the error appeared on the most recent previous version of the plugin, so it must’ve been Cookie Bar v 1.6.3?

    • This reply was modified 1 year, 5 months ago by miealex.

    Same thing now

    [03-Aug-2018 13:33:55] PHP Parse error: syntax error, unexpected '[' in /home2/zzzzzzz/public_html/wp-content/plugins/cookiebar/cookiebar-wp.php on line 65

    Same workaround 🙂

    PHP is 7.0.25 on this domain!

    I switched to 5.6 but I got the same error:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘[‘ in /home2/xebeecom/public_html/wp-content/plugins/cookiebar/cookiebar-wp.php on line 65

    • This reply was modified 1 year, 5 months ago by miealex.
    Plugin Author tox82

    (@tox82)

    That’s weird, the short array syntax should be available at least since php 5.4… I’ll revert to the old syntax asap though.

    Thanks for telling me about this problem!

    @tox82 : my pleasure, go for it 🙂 It may be happening to other people, too.

    Plugin Author tox82

    (@tox82)

    The issue should be fixed in the latest release. Can you confirm?

    Yup, it’s working fine 😉 No issue when activating.
    https://xebee.com

    Thank you!

    Plugin Author tox82

    (@tox82)

    Great! I’m marking this topic as resolved then 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error when trying to activate’ is closed to new replies.