Calling drupal_add_js() in hook_init() results in intermittent errors as the function is undefined until later in the bootstrap.
Fatal error: Call to undefined function drupal_add_js() in /sites/all/modules/cleanpager/cleanpager.module on line 53
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | cleanpager-280217-01.patch | 3.42 KB | jbrauer |
Comments
Comment #1
jbrauer commentedThe attached patch moves drupal_add_js() to the hook_menu() call.
It also addresses coding style issues reported by code-style.pl
Comment #2
chrisshattuck commentedWow, Josh, only took me a year to get to this. Eesh. Anyway, committed and done, just in time for a Drupal 7 release!