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

CommentFileSizeAuthor
#1 cleanpager-280217-01.patch3.42 KBjbrauer

Comments

jbrauer’s picture

Status: Active » Needs review
StatusFileSize
new3.42 KB

The attached patch moves drupal_add_js() to the hook_menu() call.

It also addresses coding style issues reported by code-style.pl

chrisshattuck’s picture

Status: Needs review » Fixed

Wow, Josh, only took me a year to get to this. Eesh. Anyway, committed and done, just in time for a Drupal 7 release!

Status: Fixed » Closed (fixed)

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