explicitly check next() against FALSE when iterating through filters. Props Denis-de-Bernardy, Otto42, Nazgul, santosj (go team effort!). fixes #4625 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@5857 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f8aca1450b
commit
8cdb0045f1
@ -57,7 +57,7 @@ function apply_filters($tag, $string) {
|
||||
$string = call_user_func_array($the_['function'], array_slice($args, 1, (int) $the_['accepted_args']));
|
||||
}
|
||||
|
||||
} while ( next($wp_filter[$tag]) );
|
||||
} while ( next($wp_filter[$tag]) !== false );
|
||||
|
||||
return $string;
|
||||
}
|
||||
@ -161,7 +161,7 @@ function do_action($tag, $arg = '') {
|
||||
if ( !is_null($the_['function']) )
|
||||
call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
|
||||
|
||||
} while ( next($wp_filter[$tag]) );
|
||||
} while ( next($wp_filter[$tag]) !== false );
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user