[wp-trac] [WordPress Trac] #20431: add_feed() - Warning
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 12 19:22:21 UTC 2012
#20431: add_feed() - Warning
--------------------------+-----------------------------
Reporter: pavelevap | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.4
Severity: normal | Keywords:
--------------------------+-----------------------------
I tried to use add_feed() function, but there is probably some problem
(using latest trunk).
{{{
Warning: in_array() [function.in-array]: Wrong datatype for second
argument in C:\WWW\Wordpress\wp-includes\rewrite.php on line 88
}}}
Error is related to rewrite.php (line 88) and in_array() function and it
seems that $wp_rewrite->feeds is null everytime, because $feeds is defined
later in WP_Rewrite() class?
Code example:
{{{
function my_test() {
echo '<item>';
}
add_feed( 'test', 'my_test' );
}}}
So, I had to use (works well):
{{{
add_action( 'do_feed_test', 'my_test' );
}}}
I am not sure, but it is probably bug...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20431>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list