Add checks for WP_Error. Props filosofo. see #4809

git-svn-id: https://develop.svn.wordpress.org/trunk@6125 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-09-18 16:32:22 +00:00
parent 37d5915b8e
commit 5917c5458c
23 changed files with 151 additions and 29 deletions
+2
View File
@@ -262,6 +262,8 @@ EOD;
log_app('Inserting Post. Data:', print_r($post_data,true));
$postID = wp_insert_post($post_data);
if ( is_wp_error( $postID ) )
$this->internal_error($postID->get_error_message());
if (!$postID) {
$this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.'));