PHP Parse error: syntax error, unexpected ‘const’ (T_CONST)
-
With the latest update I get an HTTP 500 because php^7.0 fails to interpret the code. The full message is:
PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /var/www/wp-content/plugins/wp-performance-pack/modules/l10n_improvements/class.wppp_mo_dynamic.php on line 45
class WPPP_MO_dynamic extends Gettext_Translations { private const PLURAL_SEP = "\x00"; // << THIS
I guess visibility modifiers for const were introduced in php 7.1. Please see https://www.php.net/manual/en/language.oop5.constants.php#language.oop5.basic.class.this
I recommend removing private in favour of compatibility.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Parse error: syntax error, unexpected ‘const’ (T_CONST)’ is closed to new replies.