Ticket #19914: 19914.2.patch
| File 19914.2.patch, 1.3 KB (added by , 14 years ago) |
|---|
-
wp-app.php
400 400 log_app('Received entry:', print_r($entry,true)); 401 401 402 402 $catnames = array(); 403 foreach ( $entry->categories as $cat ) { 404 array_push($catnames, $cat["term"]); 403 if ( !empty( $entry->categories ) ) { 404 foreach ( $entry->categories as $cat ) { 405 array_push($catnames, $cat["term"]); 406 } 405 407 } 406 408 407 409 $wp_cats = get_categories(array('hide_empty' => false)); … … 423 425 $blog_ID = get_current_blog_id(); 424 426 $post_status = ($publish) ? 'publish' : 'draft'; 425 427 $post_author = (int) $user_ID; 426 $post_title = $entry->title[1]; 427 $post_content = $entry->content[1]; 428 $post_excerpt = $entry->summary[1]; 429 $pubtimes = $this->get_publish_time($entry->published); 428 $post_title = empty( $entry->title ) ? '' : (string) $entry->title[1]; 429 $post_content = empty( $entry->content ) ? '' : (string) $entry->content[1]; 430 $post_excerpt = empty( $entry->summary ) ? '' : (string) $entry->summary[1]; 431 $pubtimes = empty( $entry->published ) ? '' : (string) $entry->published; 432 $pubtimes = $this->get_publish_time( $pubtimes ); 433 430 434 $post_date = $pubtimes[0]; 431 435 $post_date_gmt = $pubtimes[1]; 432 436