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: http://svn.automattic.com/wordpress/trunk@5857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
48b20cf17d
commit
b64ce2d0f0
|
@ -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