A couple of previous tickets (now closed) have noted that OpenLayers throws fatal "unexpected T_FUNCTION" errors when running versions of PHP older than 5.3.20 due to the use of anonymous functions ("closures") in a few places in the code:

Rather than requiring a later version of PHP, it would be better to simply replace the anonymous functions with a named function. Anonymous functions make the code harder to read anyway.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sheldon Rampton’s picture

Here's a patch that removes the anonymous functions.

Sheldon Rampton’s picture

Here's a reroll of the patch which also removes the PHP 5.3 dependency from the module's .info file.

Pol’s picture

Thank you very much, committed.

Pol’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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