Index: src/wp-includes/category.php
===================================================================
--- src/wp-includes/category.php	(revision 25632)
+++ src/wp-includes/category.php	(working copy)
@@ -76,13 +76,17 @@
  * @param int|object $category Category ID or Category row object
  * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
  * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
- * @return mixed Category data in type defined by $output parameter.
+ * @return object|array|WP_Error Category data in type defined by $output parameter. WP_Error if $category does not exist.
  */
 function get_category( $category, $output = OBJECT, $filter = 'raw' ) {
 	$category = get_term( $category, 'category', $output, $filter );
+
 	if ( is_wp_error( $category ) )
 		return $category;
 
+	if ( null === $category )
+		return new WP_Error( 'invalid_category', __( 'Invalid category' ) );
+
 	_make_cat_compat( $category );
 
 	return $category;
