Reputation: 100
I for some reason am getting an error when trying to deploy my app to a shared host.
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!
Upvotes: 3
Views: 5717
Reputation: 1659
I got the same problem in my linux shared hosting. when I make the default version of php from 5.3 to 5.5 it has been solved properly.
Upvotes: 2