From 92f3fdb956674c8c713f8b4dd1e0f0169869c7fd Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 16 May 2017 08:52:55 +0000 Subject: [PATCH] Adjust post meta checks Merges [40692] to the 4.2 branch. Built from https://develop.svn.wordpress.org/branches/4.2@40698 git-svn-id: http://core.svn.wordpress.org/branches/4.2@40561 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index eea09d096d..86fd8dcbd4 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -332,6 +332,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 )