[wp-trac] [WordPress Trac] #17817: do_action/apply_filters/etc. recursion on same filter kills underlying call
WordPress Trac
noreply at wordpress.org
Thu Oct 9 00:59:54 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 jbrinley):
Replying to [comment:72 leewillis77]:
> In this situation, the third callback will only receive one argument,
not two. The revised patch attached resolves this, complete with a test to
prove it. I cannot for the life of me work out why though - it's as though
the array_slice is affecting $args (Which it shouldn't).
Great catch, @leewillis77. After the assign-by-ref happens on one
iteration, the reference is maintained in the next iteration when the
array is sliced.
I'll run some benchmarking, but I expect the change to be inconsequential.
Thanks for testing!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17817#comment:74>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list