0

enter image description hereParse error: syntax error, unexpected '[' in /home/vvamic/public_html/www.shopperz.biz/app/autoload.php on line 40

  • can you please upload fulle code in question, so that someone will help you.... – Baby in Magento Mar 26 '17 at 14:54
  • Are you sure, that you screenshot do not contain confidential data? – sergei.sss Mar 26 '17 at 19:02
  • can you please upload code of autoload.php..... – Baby in Magento Mar 26 '17 at 19:25
0

I'm guessing this is Magento 2 autoload (although you tagged both 1.9 and 2 and 2.1, so it's a guess). The newer versions of PHP allow arrays to be defined with a "shorthand" syntax of just square brackes: []. On the last line of app/autoload.php the bootstrapper populates the autoload stuff and an empty array is the second parameter:

\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);

This new syntax was introduced in PHP 5.4

As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].

I would check the version of PHP being utilized by your server. If it's 5.3, you will need to upgrade it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.