mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Check type. Props josephscott. fixes #8267
git-svn-id: https://develop.svn.wordpress.org/trunk@9745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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.'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user