I just updated the notify module after months and am now receiving this whenever I run drush:

Parse error: syntax error, unexpected '?' in modules/notify/notify.module on line 815
Drush command terminated abnormally due to an unrecoverable error.                                           [error]
Error: syntax error, unexpected '?' in modules/notify/notify.module, line 815
The external command could not be executed due to an application error.                                      [error]

The line in question is:

), array('langcode' => $upl)) . ' ' . $shortlink ?? '' . "<br />";

I moved the notify directory out of /modules and reran 'drush cr' and it rebuilt cache just fine. I then ran 'drush dl notify' and 'drush en notify' (it was already enabled) and 'drush updb' to get a clean version of the code. The error returned with the updb.

I've had to disable notify again as I can't use drush with it.

I'm surprised not to find anyone else with this issue, so I'm wondering what I can do to help troubleshoot it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joverstreet001 created an issue. See original summary.

gisle’s picture

gisle’s picture

Status: Active » Needs review
FileSize
583 bytes

Here is a patch that should fix it. Please review.

  • ilchovuchkov committed ca13b2e on 8.x-1.x
    Issue #3079850 by gisle, ilchovuchkov: Update modules/notify/notify....
vuil’s picture

Update and commit to the 8.x-1.x (dev) version.
The $short_linkvariable might not be initialized, remove the PHP 7.1 issue.

Thanks to everyone!

vuil’s picture

Status: Needs review » Fixed
vuil’s picture

Status: Fixed » Closed (fixed)
gisle’s picture

Status: Closed (fixed) » Fixed

Never set status to "Closed (fixed)". Leave it at "Fixed" to allow two weeks for regrssions. Please see the last bullet point in Issue Queue Etiquette.

vuil’s picture

Yes, you are right. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.