[wp-trac] [WordPress Trac] #19417: has_filter() can return 0, and remove_filter() doesn't use $accepted_args

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 2 21:12:49 UTC 2011


#19417: has_filter() can return 0, and remove_filter() doesn't use $accepted_args
--------------------------+-----------------------------
 Reporter:  nacin         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 has_filter() returns priority, which means it can return 0. But core
 doesn't check for it being identical to false. We should audit all
 has_filter() calls and make sure 'false !==' or 'false ===' depending on
 what we want.

 Additionally remove_filter() has an $accepted_args argument, but doesn't
 use it. We should eliminate it from the function definition and docs.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19417>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list