WordPress.org

Make WordPress Core

Changeset 23353


Ignore:
Timestamp:
01/28/13 04:17:05 (2 years ago)
Author:
SergeyBiryukov
Message:

Sanitize post_author and comment_count as integer fields. props GeertDD. fixes #22324.

File:
1 edited

Legend:

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

    r23320 r23353  
    19901990 */ 
    19911991function sanitize_post_field($field, $value, $post_id, $context) { 
    1992     $int_fields = array('ID', 'post_parent', 'menu_order'); 
     1992    $int_fields = array('ID', 'post_parent', 'menu_order', 'post_author', 'comment_count'); 
    19931993    if ( in_array($field, $int_fields) ) 
    19941994        $value = (int) $value; 
Note: See TracChangeset for help on using the changeset viewer.