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

git-svn-id: https://develop.svn.wordpress.org/trunk@20403 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2012-04-08 09:40:04 +00:00
parent 0a352eed01
commit 9e3be2f747
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;