if you happen to call list_themes(true) (which apparently, core doesn't currently do anywhere, but it might need to in order to fix http://drupal.org/node/134160) you get a php E_ALL warning. attached patch fixes it.

CommentFileSizeAuthor
#1 theme_tab.patch1.36 KBchx
list_theme_warning.patch.txt572 bytesdww
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Title: php warning in list_themes(true) » No menu tabs for themes
Assigned: dww » chx
Priority: Minor » Critical
FileSize
1.36 KB

Weirdo PHP issue in theme.inc causes list_theme(TRUE) to fail in strange ways. Attached patch solves the problem. I will research into the why.

chx’s picture

chx’s picture

The manual says:

If a static variable is unset() inside of a function, unset() destroys the variable only in the context of the rest of a function. Following calls will restore the previous value of a variable.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Weird PHP behavior, but oh well. Committed to CVS HEAD. Thanks again, chx.

dww’s picture

ugh. well, at least my original fix was right, we need to call list_themes() before the menu rebuild(). ;) it just so happens that php is so crazy that the rebuild stuff in list_themes() never worked. :( *sigh*

in the future, i should remember that if i find something that makes no sense at all, chances are good there's a php bug involved...

Anonymous’s picture

Status: Fixed » Closed (fixed)