mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 15:47:05 +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:
@@ -284,6 +284,8 @@ function wp_write_post() {
|
||||
|
||||
// Create the post.
|
||||
$post_ID = wp_insert_post( $_POST );
|
||||
if ( is_wp_error( $post_ID ) )
|
||||
return $post_ID;
|
||||
|
||||
if ( empty($post_ID) )
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user