diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 53566cbeff..945d659fb0 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -4311,7 +4311,7 @@ class wp_xmlrpc_server extends IXR_Server { do_action( 'xmlrpc_call', 'wp.getMediaItem' ); $attachment = get_post( $attachment_id ); - if ( ! $attachment ) { + if ( ! $attachment || 'attachment' !== $attachment->post_type ) { return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 24de64015e..0569a16ea2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta2-49384'; +$wp_version = '5.6-beta2-49385'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.