Prevent notice "Undefined variable: struct" in mt_getRecentPostTitles when posts exist, but none of them are editable. Fixes #20393.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
duck_ 2012-04-08 09:40:04 +00:00
parent 2410e392b9
commit e25e2fb081
1 changed files with 2 additions and 0 deletions

View File

@ -4502,6 +4502,8 @@ class wp_xmlrpc_server extends IXR_Server {
return $this->error;
}
$struct = array();
foreach ($posts_list as $entry) {
if ( !current_user_can( 'edit_post', $entry['ID'] ) )
continue;