[wp-trac] [WordPress Trac] #17817: do_action/apply_filters/etc. recursion on same filter kills underlying call
WordPress Trac
noreply at wordpress.org
Thu May 1 05:56:13 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: has-patch needs-testing dev- | Resolution:
feedback has-unit-tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by edward_plainview):
I've recently encountered this same ... "bug" with my Broadcast plugin
that hooked into the same save_post hook that another plugin at an earlier
priority used. Took me hours of debugging to find the problem.
Long story short: the earlier plugin is called, calls save_post itself,
broadcast is run as per save_post, and then the hook finishes, without
calling the "outer" save_post loop.
This needs to be fixed since I wasn't expecting the hook looping to be
broken. My patch uses foreach loops, but I see that others have suggested
foreaches also.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17817#comment:59>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list