Instead of polluting the global namespace, this is a perfect use case for drupal_static().
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1196812.1-use_drupal_static.patch | 1.73 KB | deviantintegral |
Instead of polluting the global namespace, this is a perfect use case for drupal_static().
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1196812.1-use_drupal_static.patch | 1.73 KB | deviantintegral |
Comments
Comment #1
deviantintegral commentedTada!
Comment #2
deekayen commentedIt wasn't a static variable before and making it static now doesn't make sense to me. Removing global declarations isn't the documented intention of the drupal_static function.