About This Ticket

Parse error: syntax error, unexpected ‘[‘ in /web/htdocs/www.latinacalcioa5.it/home/wp-content/themes/soccerclub/functions.php on line 7

by softpc / September 14, 2017, 2:42 pm

Good morning, excuse me, but it is urgent, I have installed the theme and I immediately come out of this error:

Parse error: syntax error, unexpected ‘[‘ in /web/htdocs/www.latinacalcioa5.it/home/wp-content/themes/soccerclub/functions.php on line 7

Staff

I see the error. Please change the theme to default by renaming the theme folder using FTP client (Don't forget to change it back to default before activating the theme again).

About the issue, what is the php version active on your server? I think the issue is because of the newer array syntax used in the theme. PHP version on the server should be at least 5.4 or greater.
Alternatively, you can open the following code in functions.php file..

$soccerclub_includes = [
    'inc/lib/soccerclub-setup.php',             // Theme setup
    'inc/lib/soccerclub-register-widgets.php',  // Register Widget Areas
    'inc/lib/soccerclub-custom-functions.php',  // Theme Custom Functions
];

..and change it to..

$soccerclub_includes = array(
    'inc/lib/soccerclub-setup.php',
    'inc/lib/soccerclub-register-widgets.php',
    'inc/lib/soccerclub-custom-functions.php',
);

Let me know if that works or not. If you fail to resolve this by yourself you can mail us your FTP
credentials at 0effortthemes@itobuz.com.

Staff

As I can see the site is running the theme successfully. Please take note that we are providing free demo installation support for first 50 customers. You can opt for that if you wish. Please revoke the bad rating from themeforest if you can as nowadays it is quite common for any LAMP hosting service to provide a version of PHP that supports the short array syntax.