Commit d440fc54 authored by Dries's avatar Dries

- Patch #473240 by Arancaytar, c960657: menu_get_names() crashed when called.

parent c33da192
......@@ -1373,7 +1373,7 @@ function menu_get_names() {
if (empty($names)) {
$names = db_select('menu_links')
->distinct()
->fields('menu_links', 'menu_name')
->fields('menu_links', array('menu_name'))
->orderBy('menu_name')
->execute()->fetchCol();
}
......
......@@ -75,6 +75,13 @@ class MenuIncTestCase extends DrupalWebTestCase {
$this->assertLink(t('Menu link #2'), 0, t('Found menu link #2'));
}
/**
* Test menu_get_names().
*/
function testMenuGetNames() {
$this->assertEqual(menu_get_names(), array('admin_shortcuts', 'main-menu', 'management', 'navigation', 'original', 'user-menu'), t('Expected menu names were returned.'));
}
/**
* Tests for menu_name parameter for hook_menu().
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment