Make WordPress Core

Changeset 13016


Ignore:
Timestamp:
02/07/2010 09:49:00 PM (15 years ago)
Author:
westi
Message:

Ensure we don't mangle the array of post ancestors when sanitising a post for editing. Fixes #12168.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r12994 r13016  
    12001200        $post['filter'] = $context;
    12011201    }
    1202 
    12031202    return $post;
    12041203}
     
    12351234    if ( in_array($field, $int_fields) )
    12361235        $value = (int) $value;
     1236
     1237    // Fields which contain arrays of ints.
     1238    $array_int_fields = array( 'ancestors' );
     1239    if ( in_array($field, $array_int_fields) ) {
     1240        $value = array_map( 'absint', $value);
     1241        return $value;
     1242    }
    12371243
    12381244    if ( 'raw' == $context )
Note: See TracChangeset for help on using the changeset viewer.