WordPress.org

Make WordPress Core

Ticket #20854: 20854.2.diff

File 20854.2.diff, 758 bytes (added by jeremyfelt, 6 years ago)
  • src/wp-includes/ms-functions.php

     
    18721872        global $wpdb;
    18731873
    18741874        $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'", $wpdb->siteid) );
    1875         update_site_option( 'blog_count', $count );
     1875        update_site_option( 'blog_count', absint( $count ) );
    18761876
    18771877        $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" );
    1878         update_site_option( 'user_count', $count );
     1878        update_site_option( 'user_count', absint( $count ) );
    18791879}
    18801880
    18811881/**