Make WordPress Core

Ticket #41513: 41513.diff

File 41513.diff, 433 bytes (added by MyThemeShop, 7 years ago)
  • wp-includes/post.php

    diff --git wp-includes/post.php wp-includes/post.php
    index 56c2ea5..3260dc8 100644
    function wp_update_post( $postarr = array(), $wp_error = false ) { 
    35793579        }
    35803580
    35813581        if ($postarr['post_type'] == 'attachment')
    3582                 return wp_insert_attachment($postarr);
     3582                return wp_insert_attachment( $postarr, false, 0, $wp_error );
    35833583
    35843584        return wp_insert_post( $postarr, $wp_error );
    35853585}