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.


new2.28 KB

Here's a patch that removes the anonymous functions.

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

Thank you very much, committed.

Status:Active» Fixed

Status:Fixed» Closed (fixed)

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