WordPress.org

Make WordPress Core

Ticket #40736: 40736.patch

File 40736.patch, 736 bytes (added by desrosj, 4 years ago)

Type cast return values as integers.

  • 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 (int) 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 (int) get_network_option( $network_id, 'blog_count' );
    122122}
    123123
    124124/**