Make WordPress Core

Changeset 5087 for trunk/app.php


Ignore:
Timestamp:
03/23/2007 12:59:21 AM (17 years ago)
Author:
matt
Message:

(int)er the dragon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/app.php

    r5000 r5087  
    418418            $this->auth_required('Sorry, you do not have the right to edit/publish new posts.');
    419419
    420         $blog_ID = $current_blog->blog_id;
     420        $blog_ID = (int )$current_blog->blog_id;
    421421        $post_status = ($publish) ? 'publish' : 'draft';
    422         $post_author = $user->ID;
     422        $post_author = (int) $user->ID;
    423423        $post_title = $entry->title;
    424424        $post_content = $entry->content;
     
    431431        log_app('Inserting Post. Data:', print_r($post_data,true));
    432432
    433         $postID = wp_insert_post($post_data);
     433        $postID = (int) wp_insert_post($post_data);
    434434
    435435        if (!$postID) {
     
    583583
    584584        // Save the data
    585         $postID = wp_insert_attachment($attachment, $file, $post);
     585        $postID = (int) wp_insert_attachment($attachment, $file, $post);
    586586
    587587        if (!$postID) {
     
    789789        if(!isset($postID)) {
    790790            global $post;
    791             $postID = $GLOBALS['post']->ID;
     791            $postID = (int) $GLOBALS['post']->ID;
    792792        }
    793793
     
    811811        if(!isset($postID)) {
    812812            global $post;
    813             $postID = $GLOBALS['post']->ID;
     813            $postID = (int) $GLOBALS['post']->ID;
    814814        }
    815815
     
    886886        $wp_query = $GLOBALS['wp_query'];
    887887        $wpdb = $GLOBALS['wpdb'];
    888         $blog_id = $GLOBALS['blog_id'];
     888        $blog_id = (int) $GLOBALS['blog_id'];
    889889        $post_cache = $GLOBALS['post_cache'];
    890890
Note: See TracChangeset for help on using the changeset viewer.