Changeset 5087 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 03/23/2007 12:59:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r4953 r5087 116 116 if ( !$category_nicename = sanitize_title($cat_name) ) 117 117 die('0'); 118 if ( !$cat_id = category_exists( $cat_name ) )119 $cat_id = wp_create_category( $cat_name );118 if ( !$cat_id = (int) category_exists( $cat_name ) ) 119 $cat_id = (int) wp_create_category( $cat_name ); 120 120 $cat_name = wp_specialchars(stripslashes($cat_name)); 121 121 $x->add( array( … … 157 157 if ( $id < 0 ) { 158 158 $now = current_time('timestamp', 1); 159 if ( $pid = wp_insert_post( array(159 if ( $pid = (int) wp_insert_post( array( 160 160 'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now)) 161 161 ) ) ) 162 $mid = add_meta( $pid );162 $mid = (int) add_meta( $pid ); 163 163 else 164 164 die('0'); 165 } else if ( !$mid = add_meta( $id ) ) {165 } else if ( !$mid = (int) add_meta( $id ) ) { 166 166 die('0'); 167 167 } … … 205 205 die('-1'); 206 206 require_once(ABSPATH . WPINC . '/registration.php'); 207 if ( !$user_id = add_user() )207 if ( !$user_id = (int) add_user() ) 208 208 die('0'); 209 209 elseif ( is_wp_error( $user_id ) ) { … … 231 231 if($_POST['post_ID'] < 0) { 232 232 $_POST['temp_ID'] = $_POST['post_ID']; 233 $id = wp_write_post();233 $id = (int) wp_write_post(); 234 234 if(is_wp_error($id)) 235 235 die($id->get_error_message());
Note: See TracChangeset
for help on using the changeset viewer.