mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
XMLRPC: In mw_newPost check to see if the post_status has been supplied before trying to use it to avoid undefined array access notices. Fixes #19774 props maxcutler.
git-svn-id: https://develop.svn.wordpress.org/trunk@20323 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
de2a91b1c4
commit
45cfe03be4
@ -3537,7 +3537,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
if ( $content_struct['post_type'] == 'page' ) {
|
||||
if ( $publish )
|
||||
$cap = 'publish_pages';
|
||||
elseif ('publish' == $content_struct['page_status'])
|
||||
elseif ( isset( $content_struct['page_status'] ) && 'publish' == $content_struct['page_status'] )
|
||||
$cap = 'publish_pages';
|
||||
else
|
||||
$cap = 'edit_pages';
|
||||
@ -3548,7 +3548,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
} elseif ( $content_struct['post_type'] == 'post' ) {
|
||||
if ( $publish )
|
||||
$cap = 'publish_posts';
|
||||
elseif ('publish' == $content_struct['post_status'])
|
||||
elseif ( isset( $content_struct['post_status'] ) && 'publish' == $content_struct['post_status'] )
|
||||
$cap = 'publish_posts';
|
||||
else
|
||||
$cap = 'edit_posts';
|
||||
@ -3561,7 +3561,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
} else {
|
||||
if ( $publish )
|
||||
$cap = 'publish_posts';
|
||||
elseif ('publish' == $content_struct['post_status'])
|
||||
elseif ( isset( $content_struct['post_status'] ) && 'publish' == $content_struct['post_status'])
|
||||
$cap = 'publish_posts';
|
||||
else
|
||||
$cap = 'edit_posts';
|
||||
|
Loading…
x
Reference in New Issue
Block a user