From b64ce2d0f0c937076c42051bba5bc64c20b78a64 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 8 Aug 2007 17:41:46 +0000 Subject: [PATCH] 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 --- wp-includes/plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index b8bf524af..47610a360 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -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 ); }