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',

Comments

dddbbb’s picture

Status: Active » Reviewed & tested by the community

I 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.

bocaj’s picture

I had the same issue. Quick fix in first post made the issue go away! Thanks duckx!

bocaj’s picture

Here is a patch to resolve the issue...

philosurfer’s picture

#3 works

thejimbirch’s picture

Had this issue locally. Changed PHP settings from 5.2.17 to 5.4.10 and it solved the problem.

liberatr’s picture

Also 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

e0ipso’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Thanks!

Status: Fixed » Closed (fixed)

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