Make WordPress Core


Ignore:
Timestamp:
03/22/2007 09:40:54 PM (19 years ago)
Author:
ryan
Message:

Cast to int

File:
1 edited

Legend:

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

    r5030 r5083  
    448448
    449449function wp_get_post_categories($post_id = 0) {
     450        $post_id = (int) $post_id;
     451
    450452        $cats = &get_the_category($post_id);
    451453        $cat_ids = array();
     
    459461
    460462        // Set the limit clause, if we got a limit
     463        $num = (int) $num;
    461464        if ($num) {
    462465                $limit = "LIMIT $num";
     
    471474function wp_get_single_post($postid = 0, $mode = OBJECT) {
    472475        global $wpdb;
     476
     477        $postid = (int) $postid;
    473478
    474479        $post = get_post($postid, $mode);
Note: See TracChangeset for help on using the changeset viewer.