[wp-trac] [WordPress Trac] #39338: class-wp-hook.php - apply_filters() infinite loop
WordPress Trac
noreply at wordpress.org
Tue Dec 20 08:51:56 UTC 2016
#39338: class-wp-hook.php - apply_filters() infinite loop
-------------------------------+------------------------------
Reporter: frettled | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 4.7
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by frettled):
Replying to [comment:2 dd32]:
> Hi @frettled and welcome to Trac.
>
> Are you able to offer any extra specific details about how this scenario
was triggered? For example, the hook name which was executing and anything
which was hooked onto it, or all plugins in use on the site?
This specific bug had referer: hxxp://.../wp-includes/admin.php?page
=mediafromftp-settings which leads me to guess that there was something
about the plugin mediafromftp that initialized the problem.
> Protecting against this is something we should do, however in order to
do that effectively, we need to determine how and why it happens to test
it.
> I've tried a few random combinations and I can't get it in a situation
where `$this->iterations[ $nesting_level ]` is unset.
I have a total of three error messages repeating infinitely, until the
process is killed by a monitoring script:
1) line 287: current() expects parameter 1 to be array, null given in
.../wp-includes/class-wp-hook.php on line 287
2) line 289: Invalid argument supplied for foreach() in .../wp-includes
/class-wp-hook.php on line 289
3) line 303: next() expects parameter 1 to be array, null given in .../wp-
includes/class-wp-hook.php on line 303
Digging into the logs for non-matching errors from the same website, I see
another error which may be related:
array_keys() expects parameter 1 to be array, integer given in ../wp-
includes/class-wp-hook.php on line 283
On this line, it's extracting from $this->callbacks.
So perhaps that's a better place for a check.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39338#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list