Check type. Props josephscott. fixes #8267
git-svn-id: http://svn.automattic.com/wordpress/trunk@9745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1fea167e6
commit
1abc6d0e91
|
@ -1906,7 +1906,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$actual_post = wp_get_single_post($post_ID,ARRAY_A);
|
$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.'));
|
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);
|
$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.'));
|
return new IXR_Error(404, __('Sorry, no such post.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue