[wp-trac] [WordPress Trac] #17817: do_action/apply_filters/etc. recursion on same filter kills underlying call

WordPress Trac noreply at wordpress.org
Fri Oct 10 20:53:56 UTC 2014


#17817: do_action/apply_filters/etc. recursion on same filter kills underlying call
-------------------------------------------------+-------------------------
 Reporter:  kernfel                              |       Owner:
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
Component:  Plugins                              |  Release
 Severity:  normal                               |     Version:  2.2
 Keywords:  dev-feedback has-unit-tests has-     |  Resolution:
  patch                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by leewillis77):

 Question: Should do_action() and apply_filters() check whether the
 callback is callable before attempting to call it - thus ending the age
 old "PHP Warning:  call_user_func_array() expects parameter 1 to be a
 valid callback" errors when invalid callbacks are used - or is that
 warning considered a "feature"?

 See also the discussion on https://core.trac.wordpress.org/ticket/29803

 Does anyone know from experience whether is_callable() is suitably
 performant - or do we need to test if we want to add it?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/17817#comment:75>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list