Changeset 5082

Show
Ignore:
Timestamp:
03/22/07 20:52:29 (2 years ago)
Author:
ryan
Message:

More int casts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/category-template.php

    r5019 r5082  
    6363global $post, $category_cache, $blog_id; 
    6464 
     65    $id = (int) $id; 
    6566    if ( !$id ) 
    6667        $id = $post->ID; 
  • trunk/wp-includes/post.php

    r5029 r5082  
    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(); 
     
    471473function wp_get_single_post($postid = 0, $mode = OBJECT) { 
    472474    global $wpdb; 
     475 
     476    $postid = (int) $postid; 
    473477 
    474478    $post = get_post($postid, $mode); 
  • trunk/xmlrpc.php

    r5074 r5082  
    362362        // Items not escaped here will be escaped in editPost. 
    363363        $blog_id    = $args[0]; 
    364         $page_id    = $this->escape($args[1]); 
     364        $page_id    = $this->escape((int) $args[1]); 
    365365        $username   = $this->escape($args[2]); 
    366366        $password   = $this->escape($args[3]); 
     
    823823        $this->escape($args); 
    824824 
    825       $post_ID     = $args[1]; 
     825      $post_ID     = (int) $args[1]; 
    826826      $user_login  = $args[2]; 
    827827      $user_pass   = $args[3]; 
     
    10651065        $this->escape($args); 
    10661066 
    1067       $post_ID     = $args[0]; 
     1067      $post_ID     = (int) $args[0]; 
    10681068      $user_login  = $args[1]; 
    10691069      $user_pass   = $args[2];