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.
Comment | File | Size | Author |
---|---|---|---|
#3 | notify-parse_error-3079850-3.patch | 583 bytes | gisle |
Comments
Comment #2
gisleLooks like the bug was introduced here: #3076738: Update notify.module (minor issues)
https://git.drupalcode.org/project/notify/commit/f95f847
To me, this looks like just a typo.
Comment #3
gisleHere is a patch that should fix it. Please review.
Comment #5
vuilUpdate and commit to the
8.x-1.x
(dev) version.The
$short_link
variable might not be initialized, remove the PHP 7.1 issue.Thanks to everyone!
Comment #6
vuilComment #7
vuilComment #8
gisleNever 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.
Comment #9
vuilYes, you are right. Thank you!