2

I designed a Symfony2-based website which I deployed successfully online on GoDaddy server and everything was working fine.

After I edited my website and uploaded everything on server I noticed an error saying something relating to a syntax error due to the occurrence of '[' in line 47 of MappingDriverChain.php file (please check out the attached image).

enter image description here

The consequence was the absence of the background styling all the routes, for instance http://yplushy.com/diapers. I was able to resolve the issue in /mothers_space by replacing

private $drivers = [];

with

private $drivers = array();

And clearing the cache. I had to repeat this in

webroot / yplushy / vendor / doctrine / common / lib / Doctrine / Common / Persistence / Mapping / Driver / SymfonyFileLocator.php

But as you can see I still have this issue with /diapers, and the problem is I don't know where in my code there is still the occurrence of "[]" instead of "array()".

Please note that in my local environment I don't have this issue.

Any suggestions, please?

Patrick
  • 129
  • 16

1 Answers1

2

[] is the way you can define an array in PHP 5.4+

But, if you are using PHP 5.3 or lower, you have to use array()

Have a look at Example #1 on http://php.net/manual/en/language.types.array.php

Mojtaba
  • 4,852
  • 5
  • 21
  • 38