[wp-trac] [WordPress Trac] #49219: feed.php calls apply_filters with too many arguments

WordPress Trac noreply at wordpress.org
Fri Jan 17 15:17:51 UTC 2020


#49219: feed.php calls apply_filters with too many arguments
--------------------------+-----------------------------
 Reporter:  bret.miller   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Feeds         |    Version:  5.3.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 feed.php calls apply filters like this:

 {{{
 return apply_filters( 'get_bloginfo_rss', convert_chars( $info ), $show );
 }}}

 But in class-wp-hook, apply_filters only accepts 2 parameters. So when
 filters are called for get_bloginfo_rss, they get the text, but not what
 was requested making it very hard to acutally create a meaningful filter.

 It needs to be changed to
 {{{
 return apply_filters( 'get_bloginfo_rss', array(convert_chars( $info ),
 $show) );
 }}}

 so that both items are passed to the filter.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49219>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list