• Resolved frensis

    (@frensis)


    Hello there,

    a PHP fatal error occours when I try to activate CoCart JWT Authentication on my local machine (PHP 7.4.33).

    PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /Users/francesco/Code/igreppi-be/wp-content/plugins/cocart-jwt-authentication/includes/class-cocart-jwt-authentication.php on line 516

    It refers to this row:
    public static function generate_token( int|string $user = '' ) { ... }

    I suppose is related to union type int|string missing in PHP 7.4
    It will be solved in a future patch?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    Thank you for reporting the error. I think this was a small oversight on my part with compatibility with older PHP versions. Will get a small patch pushed this week.

    In the mean time I recommend upgrading to PHP 8 or above.

    Plugin Author Sébastien Dumont

    (@sebd86)

    Patch v2.5.2 released.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP 7.4 Error activating plugin (v. 2.5.1)’ is closed to new replies.