From a4e59b62ebea98dce9938c91449b835b9a43211d Mon Sep 17 00:00:00 2001 From: wpmuguru Date: Tue, 25 May 2010 00:13:03 +0000 Subject: [PATCH] eliminate warning in global_terms(), global to static, fixes #13517 git-svn-id: http://svn.automattic.com/wordpress/trunk@14866 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index f9262ffcea..4eff2ae90b 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1209,18 +1209,19 @@ function fix_import_form_size( $size ) { * @return int An ID from the global terms table mapped from $term_id. */ function global_terms( $term_id, $deprecated = '' ) { - global $wpdb, $global_terms_recurse; + global $wpdb; + static $global_terms_recurse; if ( !global_terms_enabled() ) return $term_id; // prevent a race condition + $recurse_start = false; if ( !isset( $global_terms_recurse ) ) { $recurse_start = true; $global_terms_recurse = 1; } elseif ( 10 < $global_terms_recurse++ ) { return $term_id; - $recurse_start = false; } $term_id = intval( $term_id );