Make WordPress Core


Ignore:
Timestamp:
03/23/2007 03:18:00 AM (19 years ago)
Author:
ryan
Message:

Big int patch for 2.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/wp-includes/post.php

    r5085 r5092  
    376376
    377377        if ( !$post_id )
    378                 $post_id = $id;
     378                $post_id = (int) $id;
    379379
    380380        $post_id = (int) $post_id;
     
    540540        // Get the post ID.
    541541        if ( $update )
    542                 $post_ID = $ID;
     542                $post_ID = (int) $ID;
    543543
    544544        // Create a valid post name.  Drafts are allowed to have an empty
     
    644644                        VALUES
    645645                        ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')");
    646                         $post_ID = $wpdb->insert_id;
     646                        $post_ID = (int) $wpdb->insert_id;
    647647        }
    648648
     
    12551255        if ( !empty($ID) ) {
    12561256                $update = true;
    1257                 $post_ID = $ID;
     1257                $post_ID = (int) $ID;
    12581258        }
    12591259
     
    13501350                        VALUES
    13511351                        ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type', '$guid')");
    1352                         $post_ID = $wpdb->insert_id;
     1352                        $post_ID = (int) $wpdb->insert_id;
    13531353        }
    13541354
     
    15051505                if ( !$post =& get_post( $mime ) )
    15061506                        return false;
    1507                 $post_id = $post->ID;
     1507                $post_id = (int) $post->ID;
    15081508                $mime = $post->post_mime_type;
    15091509        }
Note: See TracChangeset for help on using the changeset viewer.