Problem OJS updating from 3.1.1.2 to 3.1.2.3

Trying to upgrade OJS from 3.1.1.2 to 3.1.2.2 (PHP 7.0.29, Apache 2.2.22, mysql 5.5.60).
I update through the command line and get the following error:

PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in ***/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 373

There are no additional errors in php-error logs, only the same line.
What is the reason and how to solve the update problem?

Today I raised PHP version to 7.3.10 and tried updating to 3.1.2.3.
I got exactly the same error. Incredible… :frowning:

@asmecher, can you please help us with this? I rummaged through the whole forum and don’t understand at all why this component may give an error when updating? :frowning:

Hi @rkhalikov,

I suspect your command line PHP interpreter is older than you think; try running php --version from the command line to verify.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks, yes, that’s it. I checked the version and used the command from /opt/php73/bin/php to update.

After that, I got a problem “You are trying to downgrade the product “” from version [3.1.1.2] to version [1.0.0.0]. Downgrades are not supported. You are trying to downgrade the product “” from version [3.1.1.2] to version [1.0.0.0]. Downgrades are not supported.” due to plugins SWORD and(or) QUICKSUBMIT. I deleted them - and finally got the correct update! Thank you all, we’ll dig the new version.

One more thing. @asmecher, I think we should fix system requirements on the download page.

image

Because actual requirements for the latest version are the following: PHP >=7.1 instead of 7.0.

Hi @rkhalikov,

Noted, will fix, thanks!

Alec Smecher
Public Knowledge Project Team