Calling drupal_add_feed in hook_init breaks SwitchTheme module
kcoop - October 2, 2009 - 19:26
| Project: | Comment RSS |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Calling drupal_add_feed indirectly calls theme_init, which performs the assignment of the $theme variable before switchtheme_init gets a change to update $custom_theme.
Apparently it is a no-no to do anything that initializes theming in hook_init (see here: http://drupal.org/node/219910).
