"syntax error, unexpected '?'" over PHP 5.*

Created on 6 March 2023, almost 2 years ago
Updated 14 June 2023, over 1 year ago

Problem/Motivation

After upgrading the module, it throws an error like this:

PHP Parse error: syntax error, unexpected '?' in /var/www/html/aiguesmataro/sites/all/modules/contrib/sharethis/sharethis.module on line 474

Proposed resolution

The null coalescing operator ?? was added in php 7.0, so it can't work on older PHP environments.

To make it run properly, you must change the line 474 in sharethis.module with this one:

$path = $_GET['q'] ? $_GET['q'] : '<front>';

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇪🇸Spain lluisma

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024