I’ve posted the identical content in GitHub. I hope that someone can come up with an answer!
I am trying to upgrade OJS from 3.0.1. I copied the database and the submission file area, and downloaded the new code. I copied and then modified config.inc.php to point to the new directory for the code and the new copy of the database. When running php tools/upgrade.php upgrade I encountered the error below. I get the same error if I attempt to access OJS as if it was ready to go, and it doesn’t matter if I have “Installed = On” or “Off”.
Parse error: syntax error, unexpected ‘[’ in /home/teslejsu/public_html/ejojs2018/lib/pkp/lib/vendor/nikic/fast-route/src/functions.php on line 13
I also attempted to modify the offending code, but nothing made the error go away. The error points to this code segment:
function simpleDispatcher(callable $routeDefinitionCallback, array $options = []) {
$options += [
‘routeParser’ => ‘FastRoute\RouteParser\Std’,
‘dataGenerator’ => ‘FastRoute\DataGenerator\GroupCountBased’,
‘dispatcher’ => ‘FastRoute\Dispatcher\GroupCountBased’,
‘routeCollector’ => ‘FastRoute\RouteCollector’,
];