Title: Parse error: syntax error, unexpected &#8216;[&#8216;
Last modified: December 18, 2017

---

# Parse error: syntax error, unexpected ‘[‘

 *  Resolved [nanotraktor](https://wordpress.org/support/users/nanotraktor/)
 * (@nanotraktor)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/)
 * After plugin upgrade i got this error:
    `Parse error: syntax error, unexpected'['
   in /path-to-site/wp-content/plugins/advanced-access-manager/Application/Core/
   Object/Menu.php on line 132` the lines 131-136 is:
 *     ```
               if (count($filtered)) { //make sure that the parent points to the first sub
                   $parent[2] = array_values($filtered)[0][2];
               }
   
               return $filtered;
           }
       ```
   
 * In $parent[2] = array_values($filtered)[0][2]; any mistakes maybe?
 * OS CentOS 6.9, PHP 5.3.3
    -  This topic was modified 8 years, 5 months ago by [nanotraktor](https://wordpress.org/support/users/nanotraktor/).

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

 *  [Eduardo Vianna](https://wordpress.org/support/users/vianna1234/)
 * (@vianna1234)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/#post-9794091)
 * I have the same problem now. The worst thing is that I can not disable the plugin
   and now I do not have access to the administrative menu. What should I do? Help
   me please.
 * Parse error: syntax error, unexpected ‘[‘ in /home/content/31/9910831/html/hotsites/
   saulo/wp-content/plugins/advanced-access-manager/Application/Core/Object/Menu.
   php on line 132
    -  This reply was modified 8 years, 5 months ago by [Eduardo Vianna](https://wordpress.org/support/users/vianna1234/).
 *  Thread Starter [nanotraktor](https://wordpress.org/support/users/nanotraktor/)
 * (@nanotraktor)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/#post-9794147)
 * I solved this problem by replacing file /wp-content/plugins/advanced-access-manager/
   Application/Core/Object/Menu.php with this [https://github.com/wp-plugins/advanced-access-manager/blob/master/Application/Core/Object/Menu.php](https://github.com/wp-plugins/advanced-access-manager/blob/master/Application/Core/Object/Menu.php)
 * I do not know if it will provoke other errors (we`ll wait for author reply), 
   but now site (and this plugin) works normally at first sight.
    -  This reply was modified 8 years, 5 months ago by [nanotraktor](https://wordpress.org/support/users/nanotraktor/).
 *  [lucadima](https://wordpress.org/support/users/lucadima/)
 * (@lucadima)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/#post-9794359)
 * Replace
 *     ```
       if (count($filtered)) { //make sure that the parent points to the first sub
                   $parent[2] = array_values($filtered)[0][2];
               }
       ```
   
 * with
 *     ```
       if (count($filtered)) { //make sure that the parent points to the first sub
                  $filteredValues = array_values($filtered);  
                  $parent[2] = $filteredValues[0][2];
   
               }
       ```
   
 *  Plugin Author [AAM Plugin](https://wordpress.org/support/users/vasyltech/)
 * (@vasyltech)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/#post-9795478)
 * Hi guys,
 * Thank you for the feedback. You can download the dev version with a fix here 
   [https://downloads.wordpress.org/plugin/advanced-access-manager.zip](https://downloads.wordpress.org/plugin/advanced-access-manager.zip).
 * Please note! PHP 5.3 is really outdated version and you should consider to migrate
   to at least 5.6 is there is such a possibility. Otherwise you’ll keep experience
   similar issues not only with AAM but also with other plugins.
 * Regards,
    Vasyl
 *  [Peter Hardy-vanDoorn](https://wordpress.org/support/users/petervandoorn/)
 * (@petervandoorn)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/#post-9802673)
 * For the record, I’ve had this on one site too. Thought it might be old PHP version(
   although was above WP minimum) but when upped to PHP 7 it still had the same 
   error.

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

The topic ‘Parse error: syntax error, unexpected ‘[‘’ is closed to new replies.

 * ![](https://ps.w.org/advanced-access-manager/assets/icon-256x256.png?rev=3447421)
 * [Advanced Access Manager – Access Governance for WordPress](https://wordpress.org/plugins/advanced-access-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-access-manager/reviews/)

## Tags

 * [aam](https://wordpress.org/support/topic-tag/aam/)
 * [upgrade-error](https://wordpress.org/support/topic-tag/upgrade-error/)

 * 5 replies
 * 5 participants
 * Last reply from: [Peter Hardy-vanDoorn](https://wordpress.org/support/users/petervandoorn/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-210/#post-9802673)
 * Status: resolved