Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | remove_anonymous_functions-2112007-2.patch | 2.6 KB | Sheldon Rampton |
#1 | remove_anonymous_functions-2112007-1.patch | 2.28 KB | Sheldon Rampton |
Comments
Comment #1
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedHere's a patch that removes the anonymous functions.
Comment #2
Sheldon Rampton CreditAttribution: Sheldon Rampton commentedHere's a reroll of the patch which also removes the PHP 5.3 dependency from the module's .info file.
Comment #3
PolThank you very much, committed.
Comment #4
Pol