WordPress.org

Make WordPress Core

Ticket #9727: 9727.diff

File 9727.diff, 584 bytes (added by Denis-de-Bernardy, 9 years ago)

in case it should...

  • wp-includes/post.php

     
    16131613 * @return int 0 on failure, Post ID on success.
    16141614 */
    16151615function wp_update_post($postarr = array()) {
    1616         if ( is_object($postarr) )
     1616        if ( is_object($postarr) ) {
     1617                // non-escaped post was passed
    16171618                $postarr = get_object_vars($postarr);
     1619                $postarr = add_magic_quotes($postarr);
     1620        }
    16181621
    16191622        // First, get all of the original fields
    16201623        $post = wp_get_single_post($postarr['ID'], ARRAY_A);