Throws an error during enabling. Culprit due to syntax error here:
line 186 - environment_indiccator.module
FIND:
186 '#default_value' => $environment->color ?: '#D0D0D0',
REPLACE WITH:
187 '#default_value' => $environment->color ? $environment->color : '#D0D0D0',
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | syntax-error-during-installation-2001076-3.patch | 626 bytes | bocaj |
Comments
Comment #1
dddbbb commentedI had the same issue but only when enabling on my remote dev server (local was fine).
My error:
Parse error: syntax error, unexpected ':' in /home/mysite/dev/sites/all/modules/environment_indicator/environment_indicator.module on line 186
Tried the suggested fix above and all seems to be working now. Many thanks duckx.
Comment #2
bocaj commentedI had the same issue. Quick fix in first post made the issue go away! Thanks duckx!
Comment #3
bocaj commentedHere is a patch to resolve the issue...
Comment #4
philosurfer commented#3 works
Comment #5
thejimbirch commentedHad this issue locally. Changed PHP settings from 5.2.17 to 5.4.10 and it solved the problem.
Comment #6
liberatrAlso had this issue today and got a white screen when I moved to a new server running PHP 5.2 (technically Drupal 7 supports 5.2 even though it is deprecated) - this version of ternary operator was new in PHP 5.3
Comment #7
e0ipsoCommitted.
Thanks!