Make WordPress Core


Ignore:
Timestamp:
01/31/2013 01:25:26 AM (14 years ago)
Author:
SergeyBiryukov
Message:

Cast post_author to string in XML-RPC methods. props markoheijnen. fixes #22324.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r23329 r23359  
    629629                        'post_type'         => $post['post_type'],
    630630                        'post_name'         => $post['post_name'],
    631                         'post_author'       => $post['post_author'],
     631                        'post_author'       => (string) $post['post_author'],
    632632                        'post_password'     => $post['post_password'],
    633633                        'post_excerpt'      => $post['post_excerpt'],
     
    811811                $_page = array(
    812812                        'dateCreated'            => $page_date,
    813                         'userid'                 => $page->post_author,
     813                        'userid'                 => (string) $page->post_author,
    814814                        'page_id'                => $page->ID,
    815815                        'page_status'            => $page->post_status,
     
    37523752
    37533753                $struct = array(
    3754                         'userid'    => $post_data['post_author'],
     3754                        'userid'      => (string) $post_data['post_author'],
    37553755                        'dateCreated' => $this->_convert_date( $post_data['post_date'] ),
    37563756                        'content'     => $content,
    3757                         'postid'  => (string) $post_data['ID']
     3757                        'postid'      => (string) $post_data['ID']
    37583758                );
    37593759
     
    38063806
    38073807                        $struct[] = array(
    3808                                 'userid' => $entry['post_author'],
     3808                                'userid'      => (string) $entry['post_author'],
    38093809                                'dateCreated' => $post_date,
    3810                                 'content' => $content,
    3811                                 'postid' => (string) $entry['ID'],
     3810                                'content'     => $content,
     3811                                'postid'      => (string) $entry['ID'],
    38123812                        );
    38133813
     
    46974697                        $resp = array(
    46984698                                'dateCreated' => $post_date,
    4699                                 'userid' => $postdata['post_author'],
     4699                                'userid' => (string) $postdata['post_author'],
    47004700                                'postid' => $postdata['ID'],
    47014701                                'description' => $post['main'],
     
    48114811                        $struct[] = array(
    48124812                                'dateCreated' => $post_date,
    4813                                 'userid' => $entry['post_author'],
     4813                                'userid' => (string) $entry['post_author'],
    48144814                                'postid' => (string) $entry['ID'],
    48154815                                'description' => $post['main'],
     
    50325032                        $struct[] = array(
    50335033                                'dateCreated' => $post_date,
    5034                                 'userid' => $entry['post_author'],
     5034                                'userid' => (string) $entry['post_author'],
    50355035                                'postid' => (string) $entry['ID'],
    50365036                                'title' => $entry['post_title'],
Note: See TracChangeset for help on using the changeset viewer.