Changeset 39915
- Timestamp:
- 01/16/2017 11:23:06 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-user-query.php
r38768 r39915 613 613 */ 614 614 if ( isset( $qv['count_total'] ) && $qv['count_total'] ) 615 $this->total_users = $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );615 $this->total_users = (int) $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) ); 616 616 617 617 if ( !$this->results ) -
trunk/tests/phpunit/tests/user/query.php
r38715 r39915 123 123 $this->assertInstanceOf( 'WP_User', $user ); 124 124 } 125 } 126 127 /** 128 * @ticket 39297 129 */ 130 public function test_get_total_is_int() { 131 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id() ) ); 132 $total_users = $users->get_total(); 133 134 $this->assertSame( 13, $total_users ); 125 135 } 126 136
Note: See TracChangeset
for help on using the changeset viewer.