MAR
31
2021
PHP Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘ in app/code/core/Mage/Core/Model/Cookie.php on line 183
The following fatal error logged after upgrade to OpenMage with PHP5.6: PHP Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘ in app/code/core/Mage/Core/Model/Cookie.php on line 183 Errors parsing app/code/core/Mage/Core/Model/Cookie.php Cause The cause is PHP7 type declaration in getSameSite() function added in commit 26b9eee1275b882dac0a84adcf8e22ca643afb61 merged into 1.9.4x tree in December 2020 and included in v19.4.10 release: Type declaration is not supported in older PHP versions. Solution Switch your PHP version to PHP 7.3+ (PHP7.0 is… Read the rest