From 8cdb0045f178ae516ef1ead3dbd82d4f0baa51bd Mon Sep 17 00:00:00 2001 From: Mark Jaquith 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: https://develop.svn.wordpress.org/trunk@5857 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 b8bf524afa..47610a3609 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 ); }