Parse error: syntax error, unexpected T_FUNCTION in /Users/jimmy/Downloads/spark-7.x-1.0-alpha3 2/profiles/spark/modules/contrib/edit/includes/wysiwyg.inc on line 93

I got this error when installing Spark alpha 3 on my Acquia Dev Desktop, using PHP 5.2. I switched to PHP 5.3 and the problem went away. It seems like the module should refuse to install if PHP < 5.3

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webchick’s picture

Hm. That's very strange, since edit.info already has a php = 5.3 entry in its info file. So it should be refusing to install.

webchick’s picture

Title: Parse error: syntax error, unexpected T_FUNCTION » Parse error: syntax error, unexpected T_FUNCTION in PHP 5.2

Clarifying title.

webchick’s picture

This was also filed at #1723096: error after installing this version so apparently it's reproducible.

Switching my local MAMP install to PHP 5.2.17, I don't get a fatal error but I do get no theme and no node title/body (and below), which is interesting:

White background page, ends with 'Submitted by admin' line, nothing else

Even after adding the php = 5.3 line to spark.info that still didn't stop from installing it, either in Drush or on the command line. :(

webchick’s picture

webchick’s picture

Project: Edit » Spark
FileSize
544 bytes

In the meantime, solving this with a core hack. :(

webchick’s picture

Status: Active » Fixed

Ok, now it's giving this during installation, which seems vastly preferably to fatal errors and broken pages:

Requirements error about PHP 5.2 during installation.

Thanks a lot for tracking this down! Marking fixed.

webchick’s picture

Assigned: Unassigned » webchick
Issue tags: +Spark Sprint 3
webchick’s picture

I decided to lax this a bit to PHP 5.3.2, so it works with Ubuntu LTS release and the like. Drupal 8 can get away with this requirement because it's not coming out until August 2013+ but Spark needs to work now.

New patch includes comments to that effect.

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