The calls to drupal_add_css() and drupal_add_js() should be in hook_init() and not hook_boot(). I started getting an error after activating elf in D6:

Notice: Trying to get property of non-object in includes/common.inc on line 1758

The debug_print_backtrace() is as follows:

#0  drupal_add_css(sites/all/modules/elf/elf.css) called at [sites/all/modules/elf/elf.module:26]
#1  elf_boot()
#2  call_user_func_array(elf_boot, Array ()) called at [includes/module.inc:450]
#3  module_invoke(elf, boot) called at [includes/bootstrap.inc:585]
#4  bootstrap_invoke_all(boot) called at [includes/bootstrap.inc:1042]
#5  _drupal_bootstrap(5) called at [includes/bootstrap.inc:981]
#6  drupal_bootstrap(8) called at [index.php:16]
CommentFileSizeAuthor
#1 elf-n402678-boot_vs_init.patch437 bytesdamienmckenna

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new437 bytes

Patch attached that renames elf_boot to elf_init.

xano’s picture

Status: Needs review » Fixed

Thanks a lot! Fixed and committed :)

Status: Fixed » Closed (fixed)

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