On ex2, we have set menu_default_active_menus', array_keys(menu_list_system_menus())) to an array, because no menu module created menus get displayed on the site, and having an empty array saves some unnecessary processing.

However menu_link_preferred() puts the results of that variable into an IN() condition, causing illegal SQL if it's empty.

The patch is easy but I need to check if the resultant query can use indexes.

CommentFileSizeAuthor
#4 menu_names.patch1.18 KBcatch
menu_names.patch666 bytescatch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch’s picture

hmm, the use case for setting this to an empty array appears to have disappeared, because this is no longer called via the same code path, however an empty array is still a valid value.

catch’s picture

Priority: Normal » Minor
Damien Tournoud’s picture

Priority: Minor » Normal
Status: Needs review » Needs work

An empty $menu_names doesn't mean "all menus should be considered" by "no menus should be considered". That means that we have to simply return NULL here.

catch’s picture

Status: Needs work » Needs review
FileSize
1.18 KB

Works for me.