From 0f3180de0203cc6874dafdd713c4b8e8880e2d10 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 16 May 2017 08:48:34 +0000 Subject: [PATCH] Adjust post meta checks Merges [40692] to the 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@40693 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40556 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 7bbde05c2b..9b80f0dfe1 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -382,6 +382,11 @@ class wp_xmlrpc_server extends IXR_Server { if ( isset($meta['id']) ) { $meta['id'] = (int) $meta['id']; $pmeta = get_metadata_by_mid( 'post', $meta['id'] ); + + if ( ! $pmeta || $pmeta->post_id != $post_id ) { + continue; + } + if ( isset($meta['key']) ) { $meta['key'] = wp_unslash( $meta['key'] ); if ( $meta['key'] !== $pmeta->meta_key ) diff --git a/wp-includes/version.php b/wp-includes/version.php index c53f4d1099..b10439a61d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7.5-alpha-40690'; +$wp_version = '4.7.5-alpha-40693'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.