From 920856cd3521457b040591a55ccf3b1964d5619c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 18 Nov 2008 00:53:30 +0000 Subject: [PATCH] Check type. Props josephscott. fixes #8267 git-svn-id: https://develop.svn.wordpress.org/trunk@9745 602fd350-edb4-49c9-b593-d223f7449a82 --- xmlrpc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmlrpc.php b/xmlrpc.php index 706fd73af5..4650422e44 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -1906,7 +1906,7 @@ class wp_xmlrpc_server extends IXR_Server { $actual_post = wp_get_single_post($post_ID,ARRAY_A); - if (!$actual_post) { + if (!$actual_post || $actual_post['post_type'] != 'post') { return new IXR_Error(404, __('Sorry, no such post.')); } @@ -1961,7 +1961,7 @@ class wp_xmlrpc_server extends IXR_Server { $actual_post = wp_get_single_post($post_ID,ARRAY_A); - if (!$actual_post) { + if (!$actual_post || $actual_post['post_type'] != 'post') { return new IXR_Error(404, __('Sorry, no such post.')); }