From 134adb6ec12431ade4da37c604394af3bf787aa8 Mon Sep 17 00:00:00 2001 From: nacin Date: Sat, 13 Nov 2010 15:32:20 +0000 Subject: [PATCH] Move cast to within array_keys to prevent warning when get_the_terms returns false. see #15407. git-svn-id: http://svn.automattic.com/wordpress/trunk@16343 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index f6784986b..70a21a866 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -66,7 +66,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename = function get_the_category( $id = false ) { $categories = get_the_terms( $id, 'category' ); - foreach ( (array) array_keys( $categories ) as $key ) { + foreach ( array_keys( (array) $categories ) as $key ) { _make_cat_compat( $categories[$key] ); } // Filter name is plural because we are return alot of categories not just one