]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/image.php
WordPress 3.8
[autoinstalls/wordpress.git] / wp-admin / includes / image.php
index f2e636bbb868ba787313551830240053c8b7ff88..61f527a569581cbe99fe3ac254f8d590e8d2b82e 100644 (file)
@@ -150,8 +150,10 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
                        update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id );
                }
        }
+
        // remove the blob of binary data from the array
-       unset( $metadata['image']['data'] );
+       if ( isset( $metadata['image']['data'] ) )
+               unset( $metadata['image']['data'] );
 
        return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
 }