[wp-trac] [WordPress Trac] #15296: Filters don't check that the function is callable

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 2 18:07:24 UTC 2010


#15296: Filters don't check that the function is callable
---------------------------+------------------------------------------------
 Reporter:  aaroncampbell  |       Owner:                 
     Type:  defect (bug)   |      Status:  new            
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Performance    |     Version:  3.0            
 Severity:  normal         |    Keywords:  dev-feedback   
---------------------------+------------------------------------------------

Comment(by scribu):

 > It seems like we should add an is_callable test to either apply_filters
 or add_filter. I'd prefer to see it on apply_filters simply because more
 filters are added than are actually run.

 There might be cases where the callback being added won't be available
 until the apply_filters() call.

 The current behaviour triggers an error, making it easier to debug.

 We could do the test ourselves and trigger our own error, but what's the
 point?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15296#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list