More int casts
git-svn-id: http://svn.automattic.com/wordpress/trunk@5082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43e6d1b011
commit
5b22739cac
|
@ -62,6 +62,7 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename =
|
||||||
function get_the_category($id = false) {
|
function get_the_category($id = false) {
|
||||||
global $post, $category_cache, $blog_id;
|
global $post, $category_cache, $blog_id;
|
||||||
|
|
||||||
|
$id = (int) $id;
|
||||||
if ( !$id )
|
if ( !$id )
|
||||||
$id = $post->ID;
|
$id = $post->ID;
|
||||||
|
|
||||||
|
|
|
@ -447,6 +447,8 @@ function wp_delete_post($postid = 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function wp_get_post_categories($post_id = 0) {
|
function wp_get_post_categories($post_id = 0) {
|
||||||
|
$post_id = (int) $post_id;
|
||||||
|
|
||||||
$cats = &get_the_category($post_id);
|
$cats = &get_the_category($post_id);
|
||||||
$cat_ids = array();
|
$cat_ids = array();
|
||||||
foreach ( $cats as $cat )
|
foreach ( $cats as $cat )
|
||||||
|
@ -471,6 +473,8 @@ function wp_get_recent_posts($num = 10) {
|
||||||
function wp_get_single_post($postid = 0, $mode = OBJECT) {
|
function wp_get_single_post($postid = 0, $mode = OBJECT) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
$postid = (int) $postid;
|
||||||
|
|
||||||
$post = get_post($postid, $mode);
|
$post = get_post($postid, $mode);
|
||||||
|
|
||||||
// Set categories
|
// Set categories
|
||||||
|
|
|
@ -361,7 +361,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
function wp_editPage($args) {
|
function wp_editPage($args) {
|
||||||
// Items not escaped here will be escaped in editPost.
|
// Items not escaped here will be escaped in editPost.
|
||||||
$blog_id = $args[0];
|
$blog_id = $args[0];
|
||||||
$page_id = $this->escape($args[1]);
|
$page_id = $this->escape((int) $args[1]);
|
||||||
$username = $this->escape($args[2]);
|
$username = $this->escape($args[2]);
|
||||||
$password = $this->escape($args[3]);
|
$password = $this->escape($args[3]);
|
||||||
$content = $args[4];
|
$content = $args[4];
|
||||||
|
@ -822,7 +822,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$this->escape($args);
|
$this->escape($args);
|
||||||
|
|
||||||
$post_ID = $args[1];
|
$post_ID = (int) $args[1];
|
||||||
$user_login = $args[2];
|
$user_login = $args[2];
|
||||||
$user_pass = $args[3];
|
$user_pass = $args[3];
|
||||||
$content = $args[4];
|
$content = $args[4];
|
||||||
|
@ -1064,7 +1064,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
$this->escape($args);
|
$this->escape($args);
|
||||||
|
|
||||||
$post_ID = $args[0];
|
$post_ID = (int) $args[0];
|
||||||
$user_login = $args[1];
|
$user_login = $args[1];
|
||||||
$user_pass = $args[2];
|
$user_pass = $args[2];
|
||||||
$content_struct = $args[3];
|
$content_struct = $args[3];
|
||||||
|
|
Loading…
Reference in New Issue