Index: wp-includes/category-template.php
===================================================================
--- wp-includes/category-template.php	(revision 16392)
+++ wp-includes/category-template.php	(working copy)
@@ -64,11 +64,14 @@
  * @return array
  */
 function get_the_category( $id = false ) {
-	$categories = get_the_terms( $id, 'category' );
+	$categories = (array) get_the_terms( $id, 'category' );
 
-	foreach ( array_keys( (array) $categories ) as $key ) {
-		_make_cat_compat( $categories[$key] );
+	if ( $categories ) {
+		foreach ( array_keys( $categories ) as $key ) {
+			_make_cat_compat( $categories[$key] );
+		}
 	}
+
 	// Filter name is plural because we are return alot of categories not just one
 	return apply_filters( 'get_the_categories', $categories );
 }
