WordPress.org

Make WordPress Core

Ticket #6612: xmlrpc.php.diff

File xmlrpc.php.diff, 1.5 KB (added by josephscott, 7 years ago)
  • xmlrpc.php

     
    13061306                // Do some timestamp voodoo 
    13071307                if ( !empty( $content_struct['date_created_gmt'] ) ) 
    13081308                        $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force 
    1309                 elseif ( !empty( $content_struct['dateCreated']) ) 
    1310                         $dateCreated = $content_struct['dateCreated']->getIso(); 
     1309                elseif ( !empty( $content_struct['dateCreated']) ) { 
     1310                        $dateCreated = new IXR_Date( $content_struct['dateCreated'] ); 
     1311                        $dateCreated = $dateCreated->getIso( ); 
     1312                } 
    13111313 
    13121314                if ( !empty( $dateCreated ) ) { 
    13131315                        $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); 
     
    15751577                // Do some timestamp voodoo 
    15761578                if ( !empty( $content_struct['date_created_gmt'] ) ) 
    15771579                        $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force 
    1578                 elseif ( !empty( $content_struct['dateCreated']) ) 
    1579                         $dateCreated = $content_struct['dateCreated']->getIso(); 
     1580                elseif ( !empty( $content_struct['dateCreated']) ) { 
     1581                        $dateCreated = new IXR_Date( $content_struct['dateCreated'] ); 
     1582                        $dateCreated = $dateCreated->getIso( ); 
     1583                } 
    15801584 
    15811585                if ( !empty( $dateCreated ) ) { 
    15821586                        $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));