PHP (7.4) Parse error: syntax error, unexpected ‘|’
-
Live site uses PHP 7.4, plugin (version 4.6.1) says it supports PHP 7.1+
WordPress crashes giving following error:
PHP message: PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /wp-content/plugins/groundhogg/includes/utils/date-time-helper.php on line 15Which is this line:
public function __construct( $datetime = 'now', \DateTimeZone|string $timezone = null ) {Possible solution maybe to make plugin compatible with declared PHP version or declare PHP version that is supported by the plugin.
This will prevent updating plugin to the latest version for live sites that are still using old PHP.
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.