Unit tests for has_filter() not resetting the array pointer.

props pento.
fixes #29070. see [29472].

Built from https://develop.svn.wordpress.org/trunk@29665


git-svn-id: http://core.svn.wordpress.org/trunk@29439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-09-02 06:50:15 +00:00
parent 53f1ba51e4
commit b5f0a32baa
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1
* return value.
*/
function has_filter($tag, $function_to_check = false) {
// Don't reset the internal array pointer
$wp_filter = $GLOBALS['wp_filter'];
$has = ! empty( $wp_filter[ $tag ] );