Replacing core forum pages with views throws a warning I set up views for forum/% paths to replace the core forum pages, and it works fine except I get this error:

Notice: Trying to get property of non-object in forum_menu_local_tasks_alter()
(line 169 of opt/jenkins/blahblah/modules/forum/forum.module).


Line 169 is the last line in this code block:

/**
 * Implements hook_menu_local_tasks_alter().
 */
function forum_menu_local_tasks_alter(&amp;$data, $router_item, $root_path) {
  global $user;

  // Add action link to 'node/add/forum' on 'forum' sub-pages.
  if ($root_path == 'forum' || $root_path == 'forum/%') {
    $tid = (isset($router_item['page_arguments'][0]) ? $router_item['page_arguments'][0]-&gt;tid : 0);


This is failing because $router_item['page_arguments'][0] is defined but it's a string, not an object. 

So what are my options here? 


I don't want to hack the forum module to change that line
I don't want to change the path of my views to something besides forum/%
So I think I need to figure out how to unset $router_item['page_arguments'][0] so that that conditional will short circuit? Or is there another way?
I ended up just using a different URL and fixing links to point to that one. Not a real fix to my problem, but whatever.