Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 8259)
+++ wp-includes/post.php	(working copy)
@@ -2424,7 +2424,7 @@
 	$post_id = (int) $post_id;
 	if ( !$post =& get_post( $post_id ) )
 		return false;
-	if ( !$imagedata = wp_get_attachment_metadata( $post->ID ) )
+	if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) )
 		return false;
 
 	$file = get_attached_file( $post->ID );
Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 8259)
+++ wp-includes/media.php	(working copy)
@@ -274,7 +274,7 @@
 }
 
 function image_get_intermediate_size($post_id, $size='thumbnail') {
-	if ( !$imagedata = wp_get_attachment_metadata( $post_id ) )
+	if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) )
 		return false;
 
 	// get the best one for a specified set of dimensions

