[wp-trac] [WordPress Trac] #38116: Introduce is_callable check into apply_filters function to avoid failure of call_user_func_array causing all filters to fail.
WordPress Trac
noreply at wordpress.org
Tue Dec 17 08:05:15 UTC 2019
#38116: Introduce is_callable check into apply_filters function to avoid failure of
call_user_func_array causing all filters to fail.
-----------------------------+------------------------------
Reporter: garrett-eclipse | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 4.6.1
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by sjoerdlinders):
Replying to [comment:2 SergeyBiryukov]:
> #49002 was marked as a duplicate.
With the solution to solve the problem in file: class-wp-hooks.php
{{{#!php
public function apply_filters( $value, $args ) {
...
foreach ( $this->callbacks[ $priority ] as $the_ ) {
// Check if callable function or method exists.
if ( !is_callable( $the_['function'] ) ) continue;
....
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38116#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list