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

WordPress Trac noreply at wordpress.org
Sat Sep 3 04:25:40 UTC 2016


#17817: do_action/apply_filters/etc. recursion on same filter kills underlying call
-------------------------------------------------+-------------------------
 Reporter:  kernfel                              |       Owner:  pento
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  4.7
Component:  Plugins                              |     Version:  2.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by pento):

 * keywords:  has-patch needs-testing needs-unit-tests => has-patch needs-
     testing has-unit-tests


Comment:

 [attachment:17817.16.diff] adds a unit test for the filters being added
 and removed from the currently running hook.

 @noplanman: The new test added (`test_remove_and_add` in
 `tests/hooks/add_filter.php`) seems to cover the remove/add behaviour you
 described in #37679, but I was unable to reproduce the output you
 described.

 Could I get you to have a look at the test, and say how it differs from
 your code?

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


More information about the wp-trac mailing list