Ticket #15407: 15407.fix-for-no-category-posts-fatal-error.patch
| File 15407.fix-for-no-category-posts-fatal-error.patch, 639 bytes (added by , 15 years ago) |
|---|
-
wp-includes/category-template.php
66 66 function get_the_category( $id = false ) { 67 67 $categories = get_the_terms( $id, 'category' ); 68 68 69 if ( ! $categories ) 70 $categories = array(); 71 69 72 foreach ( array_keys( (array) $categories ) as $key ) { 70 73 _make_cat_compat( $categories[$key] ); 71 74 } 75 72 76 // Filter name is plural because we are return alot of categories not just one 73 77 return apply_filters( 'get_the_categories', $categories ); 74 78 }