mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 23:27:39 +02:00
Fix notice
git-svn-id: http://svn.automattic.com/wordpress/trunk@9893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b4d5ab3a01
commit
3cd406eab7
@ -127,7 +127,7 @@ function get_the_category( $id = false ) {
|
|||||||
$categories = get_object_term_cache( $id, 'category' );
|
$categories = get_object_term_cache( $id, 'category' );
|
||||||
if ( false === $categories ) {
|
if ( false === $categories ) {
|
||||||
$categories = wp_get_object_terms( $id, 'category' );
|
$categories = wp_get_object_terms( $id, 'category' );
|
||||||
wp_cache_add($post->ID, $categories, 'category_relationships');
|
wp_cache_add($id, $categories, 'category_relationships');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty( $categories ) )
|
if ( !empty( $categories ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user