[wp-trac] [WordPress Trac] #24336: XML RPC arguments for wp.getPosts are invalid
WordPress Trac
noreply at wordpress.org
Tue May 14 16:09:51 UTC 2013
#24336: XML RPC arguments for wp.getPosts are invalid
--------------------------+-----------------------------
Reporter: bduffez | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
Version: WP3.5 (latest)
Issue: can't use `wp.getPosts` XML RPC method.
Error: username/password invalid
Issue: PHP error
File: `wp-includes/class-wp-xmlrpc-server.php`
Line: `1433`
Code:
{{{
function wp_getPosts( $args ) {
if ( ! $this->minimum_args( $args, 3 ) )
return $this->error;
$this->escape( $args );
$blog_id = (int) $args[0];
$username = $args[1];
$password = $args[2];
$filter = isset( $args[3] ) ? $args[3] : array();
}}}
Just before the this->escape( $args ) I did a print_r of $args:
{{{
args=Array
(
[password] => foo
[filter] => Array
(
[post_type] => page
)
[username] => bar
[blog_id] => 1
)
}}}
However, as you can see, `$username` and `$password` are extracted from
`$args[1]`, `$args[2]` instead of `$args[username]` and `$args[password]`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24336>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list