Laravel - (1/1) FatalErrorException syntax error, unexpected '?' in LaravelLocalization.php line 896

783 Views Asked by At

Everything was working well but after doing composer update, I am facing this error

FatalErrorException syntax error, unexpected '?' in LaravelLocalization.php line 896 ",

what is wrong? I'm using mcamara/laravel-localization package

1

There are 1 best solutions below

0
On BEST ANSWER

I checked that line inside the code of the package - the error is caused by the ?? operator introduced with PHP7 (http://php.net/manual/en/migration70.new-features.php). It seems you're using an older version of PHP - try switching to version 1.2 of this package.