• Hi,

    I have been asked to look into an issue that has just cropped up on a site. The error is pointing to the cookie-notice/dashboard.php file.

    The error received is:

    Parse error: syntax error, unexpected ‘[‘ in …path/wp-content/plugins/cookie-notice/includes/dashboard.php on line 21

    Actions proceeding the error: The user has confirmed that she upgraded some plugins yesterday and then could no longer access the site or the admin panel.

    Any ideas why this has happened and how I can resolve?

    WordPress version: At least: 5.4.2

    Server info:
    MySQL: 5.6.32
    PHP: 5.3

    Thank you!

    • This topic was modified 2 years, 2 months ago by liamsquire.
    • This topic was modified 2 years, 2 months ago by liamsquire.
    • This topic was modified 2 years, 2 months ago by liamsquire.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Any ideas why this has happened and how I can resolve?

    The problem is that Cookie Notice code uses short array syntax there – this feature has been introduced in PHP 5.4. So despite that the plugin claims PHP 5.3 compatibility, this is not true.

    Your options are:

    1. Update your PHP version to 5.4 at least.
    2. Wait for developers to fix this issue.
    3. Use another plugin.

    I would strongly recommend updating your PHP version – WordPress itself requires at least PHP 5.6 since WordPress 5.2.

    Cheers,
    Česlav

    Thread Starter liamsquire

    (@liamsquire)

    Hi Česlav,

    Many thanks for taking the time to reply. This makes sense to me. I will follow up and post back.

    Thank you, again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Parse error: syntax error, unexpected ‘[‘’ is closed to new replies.