Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 24178)
+++ wp-includes/media.php	(working copy)
@@ -2372,12 +2372,12 @@
  *
  * @param int $post_id Optional. Post ID.
  * @param boolean $html Whether to return HTML or data
- * @return array Gallery data and srcs parsed from the expanded shortcode
+ * @return string|array Gallery data and srcs parsed from the expanded shortcode
  */
 function get_post_gallery( $post_id = 0, $html = true ) {
 	$post = empty( $post_id ) ? clone get_post() : get_post( $post_id );
 	if ( empty( $post ) || ! has_shortcode( $post->post_content, 'gallery' ) )
-		return array();
+		return $html ? '' : array();
 
 	$data = get_content_galleries( $post->post_content, $html, false, 1 );
 	return reset( $data );
