Move cast to within array_keys to prevent warning when get_the_terms returns false. see #15407.

git-svn-id: https://develop.svn.wordpress.org/trunk@16343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-11-13 15:32:20 +00:00
parent a2dfe18dfd
commit 7f4e354bd1
1 changed files with 1 additions and 1 deletions

View File

@ -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