function menu_local_tasks($level = 0) {
...
  if (isset($data['tabs'][$level])) {
    return array(
      'tabs' => $data['tabs'][$level],
      'actions' => $data['actions'],
      'root_path' => $root_path,
    );
  }
  // @todo If there are no tabs, there can still be actions!
  elseif (!empty($data['actions']['output'])) {
    return array('actions' => $data['actions']) + $empty;
  }
  return $empty;
}

Comments

pwolanin’s picture

Did you actually observe this as a bug, or just from reading the code?

I think this would be a problem, for example, if there are actions at depth 3, but no tabs at depth 3?

sun’s picture

Yes, encountered as bug in #542658-72: Move action "tabs" out of local tasks

Sorry, should have linked to that issue.