Title: Parse error: syntax error, unexpected &#8216;[&#8216;
Last modified: May 31, 2022

---

# Parse error: syntax error, unexpected ‘[‘

 *  [liamsquire](https://wordpress.org/support/users/liamsquire/)
 * (@liamsquire)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-274/)
 * 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 3 years, 12 months ago by [liamsquire](https://wordpress.org/support/users/liamsquire/).
    -  This topic was modified 3 years, 12 months ago by [liamsquire](https://wordpress.org/support/users/liamsquire/).
    -  This topic was modified 3 years, 12 months ago by [liamsquire](https://wordpress.org/support/users/liamsquire/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-syntax-error-unexpected-274%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Česlav Przywara](https://wordpress.org/support/users/chesio/)
 * (@chesio)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-274/#post-15698169)
 * > 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](https://wordpress.org/support/users/liamsquire/)
 * (@liamsquire)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-274/#post-15698362)
 * 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.

 * ![](https://ps.w.org/cookie-notice/assets/icon-256x256.png?rev=3549327)
 * [Compliance by Hu-manity.co](https://wordpress.org/plugins/cookie-notice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice/reviews/)

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [Unexpected](https://wordpress.org/support/topic-tag/unexpected/)

 * 2 replies
 * 2 participants
 * Last reply from: [liamsquire](https://wordpress.org/support/users/liamsquire/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-274/#post-15698362)
 * Status: not resolved