﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
11338	Custom Walker initialize error	ShaneF		"While I was delvoping a customer walker for my wp_list_pages, I was having trouble getting it to read my customer extended class of Walker_Page. I was talking with DD32 last night and he came up with the solution..

{{{
wp_list_pages(array('walker' => 'new Walker_Page_Rabbit', 'title_li' => '', 'depth' => '1')); 
}}}

...instead of...

{{{
wp_list_pages(array('walker' => 'Walker_Page_Rabbit', 'title_li' => '', 'depth' => '1')); 
}}}

Clearly the reason for including the ""new"" was because in the 'category-template.php' and 'post-template.php' had...

{{{
 	if ( empty($r['walker']) )
 		$walker = new Walker_Page;
 	else
		$walker = $r['walker'];
}}}

I found out that having 'new' in the 
{{{
$r['walker']
}}}
..caused a mismatched argument in the...

{{{
return call_user_func_array(array(&$walker, 'walk'), $args);
}}}

'new' would be passed on. Once I changed the code in the 'core' to include the new and I would define just 'Walker_Page_Rabbit' in the 'wp_list_page' and it worked perfectly.

{{{
 	if ( empty($r['walker']) )
 		$walker = new Walker_Page;
 	else
		$walker = new $r['walker'];
}}}

This is a major blocker for any people who are working on customer walkers. Attached is a patch that does work.
				"	enhancement	reopened	normal	Future Release	Inline Docs	2.9	normal		needs-patch needs-phpdoc	
