mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -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.'));
|
||||
|
||||
Reference in New Issue
Block a user