• Resolved No3x

    (@no3x)


    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.

    • This topic was modified 4 years, 11 months ago by No3x.
    • This topic was modified 4 years, 11 months ago by No3x.
    • This topic was modified 4 years, 11 months ago by No3x.
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.