I for some reason am getting an error when trying to deploy my app to a live server.
I am getting this error :
Parse error: syntax error, unexpected '[' in public_html/dev/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 411
function class_uses_recursive($class)
{
$results = [];
foreach (array_merge([$class => $class], class_parents($class)) as $class)
{
$results += trait_uses_recursive($class);
}
return array_unique($results);
}
I am aware that Laravel 4 needs PHP >= 5.4 and I am currently running 5.4 on my host, as well as my dev environment (which the app runs fine) and in the code above I am aware that '[ ]' is shorthand for the older array();
This is probably something I am just overlooking but my brain seems to be not working well this morning.
Thanks in advance!
Same thing here PHP version 5.4.20 running on dreamhost.
I updated laravel to create a new project and when I tried to access the /public folder it crashes with the same error =S.
Does changing the [] to array() fix the issue?
Thanks ;)
SOLVED!
I don't know what happened with my dreamhost server but when login via ssh and checking version on the terminal it said 5.4, however I accessed the Control Panel and the PHP version was set to 5.3.
Hope this helps sbdy.
Cheers ;)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community