Make WordPress Core

Ticket #40736: 40736.2.patch

File 40736.2.patch, 750 bytes (added by pmbaldha, 7 years ago)

make sure return values are interger by intval function

  • src/wp-includes/ms-functions.php

     
    102102 * @return int Number of active users on the network.
    103103 */
    104104function get_user_count( $network_id = null ) {
    105         return get_network_option( $network_id, 'user_count' );
     105        return intval( get_network_option( $network_id, 'user_count' ) );
    106106}
    107107
    108108/**
     
    118118 * @return int Number of active sites on the network.
    119119 */
    120120function get_blog_count( $network_id = null ) {
    121         return get_network_option( $network_id, 'blog_count' );
     121        return intval( get_network_option( $network_id, 'blog_count' ) );
    122122}
    123123
    124124/**