Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 6372)
+++ wp-admin/includes/post.php	(working copy)
@@ -106,7 +106,7 @@
 	wp_update_post( $_POST );
 
 	// Reunite any orphaned attachments with their parent
-	if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )
+	if ( !is_array( $draft_ids = get_user_option( 'autosave_draft_ids' ) ) )
 		$draft_ids = array();
 	if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) )
 		_relocate_children( $draft_temp_id, $post_ID );
@@ -200,7 +200,7 @@
 	$temp_id = false;
 	if ( isset($_POST['temp_ID']) ) {
 		$temp_id = (int) $_POST['temp_ID'];
-		if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )
+		if ( !is_array( $draft_ids = get_user_option( 'autosave_draft_ids' ) ) )
 			$draft_ids = array();
 		foreach ( $draft_ids as $temp => $real )
 			if ( time() + $temp > 86400 ) // 1 day: $temp is equal to -1 * time( then )
@@ -292,7 +292,7 @@
 	add_meta( $post_ID );
 
 	// Reunite any orphaned attachments with their parent
-	if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )
+	if ( !is_array( $draft_ids = get_user_option( 'autosave_draft_ids' ) ) )
 		$draft_ids = array();
 	if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) )
 		_relocate_children( $draft_temp_id, $post_ID );
