Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.404
diff -u -p -r1.404 menu.inc
--- includes/menu.inc	5 Aug 2010 07:56:50 -0000	1.404
+++ includes/menu.inc	18 Aug 2010 16:30:48 -0000
@@ -1082,7 +1082,7 @@ function menu_tree_page_data($menu_name,
           if (drupal_is_front_page()) {
             $args[] = '<front>';
           }
-          $active_link = db_select('menu_links')
+          $result = db_select('menu_links', NULL, array('fetch' => PDO::FETCH_NUM))
             ->fields('menu_links', array(
               'p1',
               'p2',
@@ -1095,12 +1095,17 @@ function menu_tree_page_data($menu_name,
             ))
             ->condition('menu_name', $menu_name)
             ->condition('link_path', $args, 'IN')
-            ->execute()->fetchAssoc();
+            ->execute();
+
+          $active_link = array();
+          foreach ($result as $link) {
+            $active_link = array_merge($active_link, $link);
+          }
 
           if (empty($active_link)) {
             // If no link exists, we may be on a local task that's not in the links.
             // TODO: Handle the case like a local task on a specific node in the menu.
-            $active_link = db_select('menu_links')
+            $result = db_select('menu_links', NULL, array('fetch' => PDO::FETCH_NUM))
               ->fields('menu_links', array(
                 'p1',
                 'p2',
@@ -1113,14 +1118,18 @@ function menu_tree_page_data($menu_name,
               ))
               ->condition('menu_name', $menu_name)
               ->condition('link_path', $item['tab_root'])
-              ->execute()->fetchAssoc();
+              ->execute();
+
+            foreach ($result as $link) {
+              $active_link = array_merge($active_link, $link);
+            }
           }
 
           // We always want all the top-level links with plid == 0.
           $active_link[] = '0';
 
           // Use array_values() so that the indices are numeric.
-          $parents = $active_link = array_unique(array_values($active_link));
+          $parents = $active_link = array_unique($active_link);
 
           $expanded = variable_get('menu_expanded', array());
           // Check whether the current menu has any links set to be expanded.
